이 규칙은 다음을 플래그 지정합니다.
resource-ref
WEB-INF/web.xml 파일에서 찾은 요소에 누락된
res-sharing-scope
요소.
Apache Tomcat 서버의 기본 자원 공유 범위는 다음과 같습니다.
Shareable
.
자원 공유 범위는 Java EE에서 선택적 속성으로 정의됩니다.
소스 스캐너에서 이 규칙에 대한 빠른 수정사항을 사용할 수 있습니다. WebSphere traditional 및 Liberty에서
Tomcat의 경우와 동일한 공유 가능 범위를 가져오기 위해 빠른 수정사항을 사용할 수 있습니다.
빠른 수정사항은 다음을 추가합니다.
res-sharing-scope
요소가 아직 설정되지 않은 경우 연결을 다음으로 정의합니다.
Shareable
.
다음은 플래그 지정되는 자원 참조의 예제입니다.
< span class = "Code"> < resource-ref>
< span class= "indent4"> < /span> < 설명>
예제 데이터베이스</description>
<res-ref-name>jdbc/exampleDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>컨테이너</res-auth>
</resource-ref>
빠른 수정사항이 res-sharing-scope 요소를 추가합니다.
< span class = "Code"> < resource-ref>
< span class= "indent4"> < /span> < 설명>
예제 데이터베이스</description>
<res-ref-name>jdbc/exampleDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>컨테이너</res-auth>
<res-sharing-scope>공유 가능</res-sharing-scope>
</resource-ref>
WebSphere Application Server에서 공유 자원 연결에 관한 자세한 정보는
공유 불가능 및 공유 가능한 연결을 참조하십시오.