複数の Liberty サーバー間の JMS メッセージングを使用可能にするためのクライアントの構成

複数のサーバーで JMS メッセージングを使用可能にするには、別の Liberty サーバーで wasJmsClient-2.0 フィーチャーを構成する必要があります。

手順

  1. クライアントで JMS クライアント・フィーチャーを使用可能にします。JNDI 検索を実行する場合は、jndi-1.0 フィーチャーも追加する必要があります。
    <featureManager>
    	<feature>wasJmsClient-2.0</feature>
    	<feature>jndi-1.0</feature>
    </featureManager>
  2. 必要な JMS リソースを構成します。
    <jmsQueueConnectionFactory jndiName="myQCF" connectionManagerRef="ConMgr4">
    	<properties.wasJms
    	remoteServerAddress="meserver.ibm.com:7276:BootstrapBasicMessaging" />
    </jmsQueueConnectionFactory>
    <connectionManager id="ConMgr4" maxPoolSize="2"/>
    
    <jmsQueue jndiName="myQ">
    	<properties.wasJms queueName="libertyQ" />
    </jmsQueue>
    注: JMS アプリケーションがリモート・メッセージング・エンジンとのリモート TCP/IP 接続を実行できるようにするため、 接続ファクトリーの <remoteServerAddress> プロパティーを構成します。 <remoteServerAddress> プロパティーは、メッセージング・エンジンが存在する、接触する必要のあるサーバーを参照します。プロパティー宣言は次のようになっている必要があります。
    remoteServerAddress="hostname:port:mode"
    ここで、 hostname はメッセージング・エンジンが稼働しているホストの名前であり、 port はサーバー・サイドで構成されている JMS インバウンド・ポートです。 mode は、SSL が使用されない場合は BootstrapBasicMessaging、 SSL が使用される場合は BootStrapSecureMessaging です。

    <remoteServerAddress> が指定されていない場合、JMS アプリケーションは、デフォルトで、同じ Liberty サーバー内のローカル・メッセージング・エンジンに接続しようとします。

  3. オプション: 追加プロパティーを構成します。
    • クライアントがメッセージング・エンジンにリモートで接続するように構成される場合、 アプリケーションがメッセージング・エンジンに接続するために使用できるカスタム・チャネルを作成 できます。2 つのデフォルトのチャネルは BootstrapBasicMessagingBootStrapSecureMessaging です。 これら 2 つのチャネル定義をオーバーライドし、カスタム・チャネルを 使用したい場合は、次のように <wasJmsOutbound> エレメントを使用します。
      <featureManager>
      	<feature>wasJmsClient-2.0</feature>
      	<feature>jndi-1.0</feature>
      </featureManager>
      
      <wasJmsOutbound id=”CustomChain”/>
      
      <jmsQueueConnectionFactory jndiName="myQCF" connectionManagerRef="ConMgr4">
      	<properties.wasJms
      	remoteServerAddress="meserver.ibm.com:7276: CustomChain" />
      </jmsQueueConnectionFactory>
      <connectionManager id="ConMgr4" maxPoolSize="2"/>
    • アプリケーション は、myQCF 接続ファクトリーを使用するときに、BootStrapBasicMessaging を 使用する代わりに CustomChain を使用して、リモート・メッセージング・エンジン に接続します。 同様に、保護されたチャネルを使用したい場合は、 次の例のように、<wasJmsOutbound> エレメント内で <useSSL> オプションを使用できます。
      <featureManager>
      	<feature>wasJmsClient-2.0</feature>
      	<feature>jndi-1.0</feature>
      </featureManager>
      
      <wasJmsOutbound id=”CustomChainSecured” useSSL=”true”/>
      
      <jmsQueueConnectionFactory jndiName="myQCF" connectionManagerRef="ConMgr4">
      	<properties.wasJms
      	remoteServerAddress="meserver.ibm.com:7276: CustomChainSecured" />
      </jmsQueueConnectionFactory>
      <connectionManager id="ConMgr4" maxPoolSize="2"/>
    メッセージング・エンジンはクライアントで稼働するように構成されます。

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: Tuesday, 6 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twlp_msg_multi_client
ファイル名: twlp_msg_multi_client.html