Package nablarch.fw.messaging.provider
Class JndiLookingUpJmsMessagingProvider
java.lang.Object
nablarch.fw.messaging.provider.JmsMessagingProvider
nablarch.fw.messaging.provider.JndiLookingUpJmsMessagingProvider
- All Implemented Interfaces:
MessagingProvider
ConnectionFactoryおよびQueueをJNDIから取得する
MessagingProvider実装クラス。リソースの取得をJNDIから行う以外は、
JmsMessagingProviderと同様。
設定例をいかに示す。
<!-- メッセージングプロバイダ定義 -->
<component name="messagingProvider"
class="nablarch.fw.messaging.provider.JndiLookingUpJmsMessagingProvider">
<!-- 本クラス独自のプロパティ(JNDI関連)-->
<!-- JNDIルックアップのための情報 -->
<property name="jndiHelper">
<component class="nablarch.core.repository.jndi.JndiHelper">
<property name="jndiProperties">
<map>
<entry key="java.naming.factory.initial" value="weblogic.jndi.WLInitialContextFactory"/>
<entry key="java.naming.provider.url" value="t3://weblogic.server.125:7001"/>
</map>
</property>
</component>
</property>
<!-- jakarta.jms.ConnectionFactory実装クラスをルックアップするためのJNDI名 -->
<property name="connectionFactoryJndiName" value="jakarta.jms.QueueConnectionFactory"/>
<!-- FWで使用するキュー論理名と、jakarta.jms.Queue実装クラスをルックアップするためのJNDI名のペア -->
<property name="destinationNamePairs">
<map>
<!-- key=キュー論理名、value=キューJNDI名 -->
<entry key="TEST.REQUEST" value="TEST.REQUEST"/>
<entry key="TEST.RESPONSE" value="TEST.RESPONSE"/>
</map>
</property>
<!-- その他のプロパティは親クラス(JmsMessagingProvider)と同じ -->
</component>
- Author:
- T.Kawasaki
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class nablarch.fw.messaging.provider.JmsMessagingProvider
JmsMessagingProvider.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionメッセージングコンテキストを返す。setConnectionFactoryJndiName(String connectionFactoryJndiName) ConnectionFactoryをJNDIから取得するためのJNDI名を設定する。setDestinationNamePairs(Map<String, String> pairs) key=キュー論理名、value=キューJNDI名をペアにしたMapを設定する。
このMapは、QueueをJNDIから取得する際に使用される。 value(キューJNDI名)からQueueがルックアップされ、 key(キュー論理名)と紐付けられて、JmsMessagingProviderに設定される。setJndiHelper(JndiHelper jndiHelper) JNDIサポートクラスを設定する。Methods inherited from class nablarch.fw.messaging.provider.JmsMessagingProvider
getConnectionFactory, setConnectionFactory, setDefaultPoisonQueue, setDefaultResponseTimeout, setDefaultTimeToLive, setDestinations, setMessagingExceptionFactory, setPoisonQueueNamePattern, setRedeliveryLimit
-
Constructor Details
-
JndiLookingUpJmsMessagingProvider
public JndiLookingUpJmsMessagingProvider()
-
-
Method Details
-
createContext
メッセージングコンテキストを返す。 この実装では、コネクションファクトリからJMSコネクションを取得し、 新規セッションを作成する。- Specified by:
createContextin interfaceMessagingProvider- Overrides:
createContextin classJmsMessagingProvider- Returns:
- メッセージングコンテキスト
-
setJndiHelper
JNDIサポートクラスを設定する。- Parameters:
jndiHelper- JNDIサポートクラス- Returns:
- 本インスタンス
-
setDestinationNamePairs
key=キュー論理名、value=キューJNDI名をペアにしたMapを設定する。
このMapは、QueueをJNDIから取得する際に使用される。 value(キューJNDI名)からQueueがルックアップされ、 key(キュー論理名)と紐付けられて、JmsMessagingProviderに設定される。- Parameters:
pairs- key=キュー論理名、value=キューJNDI名をペアにしたMap- Returns:
- 本インスタンス
-
setConnectionFactoryJndiName
public JndiLookingUpJmsMessagingProvider setConnectionFactoryJndiName(String connectionFactoryJndiName) ConnectionFactoryをJNDIから取得するためのJNDI名を設定する。- Parameters:
connectionFactoryJndiName-ConnectionFactoryのJNDI名- Returns:
- 本インスタンス
-