[8.5.5.2 이상]Liberty Repository

JCA 활성화 스펙 구성

JCA(Java™ EE Connector Architecture) 스펙을 준수하는 활성화 스펙을 구성할 수 있습니다.

이 태스크 정보

설치된 자원 어댑터가 제공하는 활성화 스펙의 인스턴스를 하나 이상 구성할 수 있습니다.
참고: Liberty 프로파일용 JCA 지원을 구성하려면 Eclipse용 WebSphere® Application Server Developer Tools의 소스 보기 또는 다른 일부 문서 편집기 중 하나를 사용하여 server.xml 파일을 편집해야 합니다. 이 주제에서는 MyAdapter라는 고유 ID가 있는 자원 어댑터가 이미 서버에 구성되어 있다고 가정하고 자원 어댑터 구성에 대한 문서에서 세부사항을 참조합니다. 기본 시나리오를 구성하는 엔드-투-엔드 예제는 다음 단계에서 제공됩니다.
참고: WebSphere® Development Tools(WDT)의 디자인 보기에서는 연결 팩토리, 관리 오브젝트, 활성화 스펙 및 자원 어댑터에 대한 서버 구성의 특성 하위 요소를 편집할 수 없습니다.

프로시저

  1. server.xml 파일을 업데이트하여 featureManager 태그 아래에 jca-1.6 기능을 추가하십시오.
    <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>
  2. 자원 어댑터를 설치하십시오. 예를 들어, server.xml 파일을 다음과 같이 업데이트하십시오.
    <resourceAdapter location="C:/adapters/MyAdapter.rar"/>
  3. 하나 이상의 활성화 스펙을 구성하십시오. 활성화 스펙을 구성할 때, activationSpec 요소를 특정 자원 어댑터가 제공하는 메시지 리스너 유형과 연관시키려면 구성 특성을 대체하지 않는 경우에도 properties 하위 요소를 제공해야 합니다. 다음 예제에서 MyAdapter 자원 어댑터는 단일 유형의 메시지 리스너만 제공합니다.
    <activationSpec id="app1/module1/MyMessageDrivenBean">
     <properties.MyAdapter messageFilter="ALL"/>
    </activationSpec>
  4. 필요한 경우, 사용 가능한 활성화 스펙 특성 하위 요소 이름을 식별하십시오.
    • 자원 어댑터가 JMS 연결 팩토리를 제외하면 단 하나의 메시지 리스너 인터페이스만 제공하는 경우, 하위 요소 이름은 properties.<rar_identifier>입니다.

    • 메시지 리스너 인터페이스 이름이 패키지 이름을 제외하면 고유한 경우, 하위 요소 이름은 properties.<rar_identifier>.<MessageListenerInterfaceName>입니다.

    • 활성화 스펙 구현 이름이 패키지 이름을 제외하면 고유한 경우, 하위 요소 이름은 properties.<rar_identifier>.<ActivationSpecificationImplementationName>입니다.

    • 활성화 스펙 구현 이름이 패키지 이름을 제외하면 고유한 경우, 하위 요소 이름은 properties.<rar_identifier>.<ActivationSpecificationImplementationName>입니다.

    • 그밖의 경우, 하위 요소 이름은 properties.<rar_identifier>.<fully.qualified.MessageListenterInterfaceName>입니다.

  5. 활성화 스펙을 메시지 구동 Bean과 연관시키는 방법에 대한 정보는 메시지 구동 Bean 배치의 문서를 참조하십시오.

다음 예제를 사용하여 두 개의 메시지 리스너 유형과 고유한 인터페이스 클래스 이름을 가진 자원 어댑터를 구성하는 방법을 학습하십시오.

다음 스니펫은 ra.xml 파일에 있으며, MyAdapter 자원 어댑터는 고유한 인터페이스 클래스 이름과 두 개의 메시지 리스너 유형을 제공합니다.

<messagelistener>
<messagelistener-type>javax.resource.cci.MessageListener</messagelistener-type>
<activationspec>
 <activationspec-class>com.vendor.adapter.CCIActivationSpec</activationspec-class>
 <config-property>
  <config-property-name>maxSize</config-property-name>
  <config-property-type>java.lang.Long</config-property-type>
 </config-property>
 ...
</activationspec>
...
</messagelistener>

<messagelistener>
<messagelistener-type>com.vendor.adapter.MyMessageListener</messagelistener-type>
<activationspec>
 <activationspec-class>com.vendor.adapter.MyActivationSpec</activationspec-class>
 <config-property> 
  <config-property-name>messageFilter</config-property-name>
  <config-property-type>java.lang.String</config-property-type>
 </config-property>
 ...
</activationspec>
...
</messagelistener>
다음은 이 시나리오를 위한 서버 구성의 예제입니다.
<activationSpec id="app1/module1/CCIMessageDrivenBean">
 <properties.MyAdapter.MessageListener maxSize="1024"/>
</activationSpec> 

<activationSpec id="app1/module1/MyMessageDrivenBean">
 <properties.MyAdapter.MyMessageListener messageFilter="ALL"/>
</activationSpec>

다음 예제를 사용하여 두 개의 메시지 리스너 유형과 고유한 구현 클래스 이름을 가진 자원 어댑터를 구성하는 방법을 학습하십시오.

다음 스니펫은 ra.xml 파일에 있으며, MyAdapter 자원 어댑터는 고유한 구현 클래스 이름과 두 개의 메시지 리스너 유형을 제공합니다.

<messagelistener>
<messagelistener-type>javax.resource.cci.MessageListener</messagelistener-type>
<activationspec> 
 <activationspec-class>com.vendor.adapter.CCIActivationSpec</activationspec-class>
 <config-property>
  <config-property-name>maxSize</config-property-name> 
  <config-property-type>java.lang.Long</config-property-type>
 </config-property> 
...
</activationspec>
...
</messagelistener>

<messagelistener>
<messagelistener-type>com.vendor.adapter.MessageListener</messagelistener-type>
<activationspec>
 <activationspec-class>com.vendor.adapter.MyActivationSpec</activationspec-class>
 <config-property>
  <config-property-name>messageFilter</config-property-name>
  <config-property-type>java.lang.String</config-property-type>
 </config-property>
...
</activationspec>
...
</messagelistener>
다음은 이 시나리오를 위한 서버 구성의 예제입니다.
<activationSpec id="app1/module1/CCIMessageDrivenBean">
 <properties.MyAdapter.CCIActivationSpec maxSize="1024"/>
</activationSpec>

<activationSpec id="app1/module1/MyMessageDrivenBean">
 <properties.MyAdapter.MyActivationSpec messageFilter="ALL"/>
</activationSpec>

다음 예제를 사용하여 두 개의 메시지 리스너 유형이 있고 단순 인터페이스와 구현 클래스 이름이 모두 고유하지 않은 자원 어댑터를 구성하는 방법을 학습하십시오.

다음 스니펫은 ra.xml 파일에 있으며, MyAdapter 자원 어댑터는 단순 인터페이스와 구현 클래스 이름이 둘 다 고유하지 않은 두 개의 메시지 리스너 유형을 제공합니다.

<messagelistener>
<messagelistener-type>javax.resource.cci.MessageListener</messagelistener-type>
<activationspec>
 <activationspec-class>com.vendor.adapter.cci.ActivationSpec</activationspec-class>
 <config-property>
  <config-property-name>maxSize</config-property-name>
  <config-property-type>java.lang.Long</config-property-type>
 </config-property> 
...
</activationspec>
...
</messagelistener>

<messagelistener>
<messagelistener-type>com.vendor.adapter.MessageListener</messagelistener-type> 
<activationspec>
 <activationspec-class>com.vendor.adapter.ActivationSpec</activationspec-class>
 <config-property>
  <config-property-name>messageFilter</config-property-name>
  <config-property-type>java.lang.String</config-property-type>
 </config-property>
...
</activationspec>
...
</messagelistener>
다음은 이 시나리오를 위한 서버 구성의 예제입니다.
<activationSpec id="app1/module1/CCIMessageDrivenBean">
 <properties.MyAdapter.javax.resource.cci.MessageListener maxSize="1024"/>
</activationSpec>

<activationSpec id="app1/module1/MyMessageDrivenBean">
 <properties.MyAdapter.com.vendor.adapter.MessageListener messageFilter="ALL"/>
</activationSpec>

구성 요소 이름의 접미부를 대체할 수 있습니다. 구성 요소 이름의 접미부를 대체하는 방법에 대해 학습하려면 JCA 구성 요소 사용자 정의에 대한 정보를 참조하십시오.


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

Information Center 이용 약관 | 피드백


시간소인 아이콘 마지막 업데이트 날짜: Wednesday, 2 September 2015
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_jca_config_actspec
파일 이름: twlp_jca_config_actspec.html