インバウンド情報
概要
インバウンド通信を使用するには,次のコンポーネントを使用します.
MessageEndpointDeployer
- インバウンド通信で利用されるメッセージエンドポイントを設定するためのコンポーネントです.
MessageEndpointFactory
- インバウンド通信で利用されるメッセージエンドポイントを生成するためのコンポーネントです.
MessageEndpointDeployer
MessageEndpointDeployer
は,
リソースアダプタが提供するメッセージエンドポイントを利用可能にするためのコンポーネントです.
MessageEndpointDeployer
の実装クラスを以下に示します.
org.seasar.jca.deploy.impl.MessageEndpointDeployer
プロパティ
プロパティ | 必須 | 説明 | デフォルト |
---|---|---|---|
activationSpecClassName |
Yes |
リソースアダプタが提供する,
javax.resource.spi.ActivationSpec の実装クラスを指定します.
|
N/A |
メソッド
メソッド | 説明 |
---|---|
setProperty(String key, String value) |
リソースアダプタ固有のプロパティを指定します. |
リソースアダプタ固有のプロパティ
リソースアダプタ固有のプロパティは,使用するリソースアダプタのドキュメントを参照してください. 主なプロダクトのドキュメントを以下に示します.
MessageEndpointFactory
MessageEndpointFactory
は,
リソースアダプタからJMSメッセージを受け取るコンポーネントを生成するコンポーネントです.
MessageEndpointFactory
の実装クラスを以下に示します.
org.seasar.jca.inbound.MessageEndpointFactoryImpl
プロパティ
プロパティ | 必須 | 説明 | デフォルト |
---|---|---|---|
listenerType |
No | リスナのインタフェースを指定します. |
MessageListener
|
endpointClass |
No |
listenerType プロパティで指定されたリスナインタフェースを実装し,
org.seasar.jca.inbound.AbstractMessageEndpointImpl を継承したクラスを指定します.
|
JMSMessageEndpointImpl
|
deliveryTransacted |
No |
メッセージをトランザクショナルに受信するにはtrue を設定します.
|
true
|
メソッド
メソッド | 説明 |
---|---|
setProperty(String key, String value) |
リソースアダプタ固有のプロパティを指定します. |
Apache ActiveMQの場合
以下にオープンソースのMOMプロダクト,Apache ActiveMQで インバウンド通信を使用する例を示します.
<component class="org.seasar.jca.deploy.impl.MessageEndpointDeployer"> <property name="activationSpecClassName"> "org.apache.activemq.ra.ActiveMQActivationSpec" </property> <initMethod name="setProperty"> <arg>"destination"</arg> <arg>"foo"</arg> </initMethod> <initMethod name="setProperty"> <arg>"destinationType"</arg> <arg>"javax.jms.Queue"</arg> </initMethod> </component> <component class="org.seasar.jca.inbound.MessageEndpointFactoryImpl"/>
IBM WebSphere MQの場合
以下にGeneric Resource Adapter for JMSを使用して IBM WebSphere MQ (formerly known MQSeries) で インバウンド通信を使用する例を示します.
<component class="org.seasar.jca.deploy.impl.MessageEndpointDeployer"> <property name="activationSpecClassName">"com.sun.genericra.inbound.ActivationSpec"</property> <initMethod name="setProperty"> <arg>"userName"</arg> <arg>"user"</arg> </initMethod> <initMethod name="setProperty"> <arg>"password"</arg> <arg>"passwork"</arg> </initMethod> <!-- キューマネージャ名 --> <initMethod name="setProperty"> <arg>"connectionFactoryProperties"</arg> <arg>"QueueManager=QMGR1"</arg> </initMethod> <!-- キュー名 --> <initMethod name="setProperty"> <arg>"destinationProperties"</arg> <arg>"BaseQueueName=LQ1"</arg> </initMethod> <!-- デスティネーションタイプ --> <initMethod name="setProperty"> <arg>"destinationType"</arg> <arg>"javax.jms.Queue"</arg><!-- または javax.jms.Topic --> </initMethod> </component> <component class="org.seasar.jca.inbound.MessageEndpointFactoryImpl"/>