JCA 구성 요소 사용자 정의

자원 어댑터를 설치할 때 JCA 특성 하위 요소를 생성할 방법을 사용자 정의할 수 있습니다.

이 태스크 정보

독립형 자원 어댑터 또는 애플리케이션에 임베드된 자원 어댑터를 설치하는 경우에는 하나 이상의 <customize> 하위 요소를 <resourceAdapter> 요소 아래에 추가하여 지정된 인터페이스 또는 구현 클래스에 대한 특성 하위 요소에 사용되는 접미부를 선택할 수 있습니다. 하위 요소를 사용자 정의하면 그렇지 않은 경우 구성 요소가 고유한 이름을 갖도록 하기 위해 특성 하위 요소 이름이 길어지는 것을 방지할 수 있습니다.
참고:

Liberty에 대한 JCA 지원을 추가하려면 WebSphere® Application Server Developer Tools for Eclipse의 서버 구성 편집기의 소스 보기 또는 일부 기타 문서 편집기를 사용하여 server.xml 파일을 편집해야 합니다. 디자인 보기에서 연결 팩토리, 관리 오브젝트, 활성화 스펙 및 자원 어댑터에 대한 구성의 일부 편집은 베타에서 지원되지 않습니다.

프로시저

  1. 독립형 자원 어댑터의 경우, 사용자 정의할 기존 구성에서 시작하십시오. 예를 들어, 자원 어댑터 MyAdapter가 두 개의 연결 팩토리를 제공하는 경우, 단순 인터페이스도 아니고 구현도 아니면 클래스 이름은 고유합니다.
    <featureManager>
     <feature>jca-1.6</feature>
     <feature>jndi-1.0</feature>  <!-- Add the jndi feature to enable look up of connection factories and administered objects. -->
     ...
    </featureManager><resourceAdapter location="C:/adapters/MyAdapter.rar"/>
    
    <connectionFactory jndiName="eis/cci-cf">
     <properties.MyAdapter.javax.resource.cci.ConnectionFactory serverName="localhost"/>
    </connectionFactory>
    
    <connectionFactory jndiName="eis/custom-cf">
     <properties.MyAdapter.com.vendor.adapter.custom.ConnectionFactory hostName="localhost"/>
    </connectionFactory> 
  2. resourceAdaptercustomize 하위 요소를 추가하여 두 연결 팩토리 인터페이스를 위한 접미부를 선택하십시오.
    <featureManager>
     <feature>jca-1.6</feature>
     <feature>jndi-1.0</feature>  <!-- Add the jndi feature to enable look up of connection factories and administered objects. --> 
    	...    
    </featureManager>
    <resourceAdapter location="C:/adapters/MyAdapter.rar">
     <customize interface="javax.resource.cci.ConnectionFactory" suffix="cci"/>
     <customize interface="com.vendor.adapter.custom.ConnectionFactory" suffix="custom"/>
    </resourceAdapter>
    
    <connectionFactory jndiName="eis/cci-cf">
     <properties.MyAdapter.cci serverName="localhost"/>
    </connectionFactory>
    
    <connectionFactory jndiName="eis/custom-cf">
     <properties.MyAdapter.custom hostName="localhost"/>
    </connectionFactory> 
  3. 애플리케이션에 임베드된 자원 어댑터의 경우, 사용자 정의할 기존 구성에서 시작하십시오. 예를 들어, 다음과 같이 MyAdapter라는 임베디드 자원 어댑터가 있는 애플리케이션 app1이 있다고 가정합니다.
    <featureManager>
     <feature>jca-1.6</feature>
     <feature>jndi-1.0</feature>  <!-- Add the jndi feature to enable look up of connection factories and administered objects. -->
    	...
    </featureManager>
    <application name="app1" type="ear" location="C:/applications/app1.ear"/>
    
    <adminObject jndiName="eis/interactionSpec-find">
     <properties.app1.MyAdapter.javax.resource.cci.InteractionSpec-com.vendor.adapter.finder.InteractionSpecImpl resultSetType="1003"/>
    </adminObject>
    
    <adminObject jndiName="eis/interactionSpec-update">
     <properties.app1.MyAdapter.com.vendor.adapter.InteractionSpec-com.vendor.adapter.updater.InteractionSpecImpl executionTimeout="3000"/> 
    </adminObject>
  4. 애플리케이션의 RAR(Resource Adapter Archive) 모듈에 resourceAdapter 요소를 지정하십시오. RAR 모듈의 모듈 이름이 될 id 속성을 지정하십시오. customize 하위 요소를 추가하여 인터페이스 또는 구현 클래스를 기반으로 하는 두 관리 오브젝트를 위한 접미부를 선택하십시오. 이 예제에서는 구현 클래스만 지정되며, 이는 관리 오브젝트를 식별하기에 충분합니다.
    <featureManager>
     <feature>jca-1.6</feature>
     <feature>jndi-1.0</feature>  <!-- Add the jndi feature to enable look up of connection factories and administered objects. -->
    	...
    </featureManager>
    <application name="app1" type="ear" location="C:/applications/app1.ear">
     <resourceAdapter id="MyAdapter">
      <customize implementation="com.vendor.adapter.finder.InteractionSpecImpl" suffix="finder"/>
      <customize implementation="com.vendor.adapter.updater.InteractionSpecImpl" suffix="updater"/>
     </resourceAdapter>
    </application>
    
    <adminObject jndiName="eis/interactionSpec-find">
     <properties.app1.MyAdapter.finder resultSetType="1003"/>
    </adminObject>
    
    <adminObject jndiName="eis/interactionSpec-update">
     <properties.app1.MyAdapter.updater executionTimeout="3000"/>
    </adminObject>

주제의 유형을 표시하는 아이콘 태스크 주제

파일 이름: twlp_jca_config_custelements.html