Configuring BTT message with JMS implementation

About this task

The JMS implementation of BTT Message is provided as bttmessage.jar ( an eclipse plug-in is provided also) and bttjmsmessage.jar. The two jars must be used at the same time.

Note that the JMS implementation of BTT Message needs the following jars from WebSphere® Application Client on runtime.
  • <WAS_APP_Client>\plugins\com.ibm.ffdc.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.admin.core.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.bootstrap.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.emf.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.runtime.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.sib.server.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.sib.utils.jar
  • <WAS_APP_Client>\plugins\com.ibm.ws.wccm.jar
  • <WAS_APP_Client>\plugins\com.ibm.wsspi.extension.jar
  • <WAS_APP_Client>\plugins\org.eclipse.core.runtime_.jar
  • <WAS_APP_Client>\plugins\org.eclipse.equinox.registry.jar
  • <WAS_APP_Client>\plugins\org.eclipse.osgi_.jar
  • <WAS_APP_Client>\lib\j2ee.jar
  • <WAS_APP_Client>\lib\bootstrap.jar
  • <WAS_APP_Client>\java\jre\lib\ext\iwsorbutil.jar
You can find them at:
  • <WAS_APP_Client>\plugins\
  • <WAS_APP_Client>\lib\
  • <WAS_APP_Client>\java\jre\lib\ext\

Please make sure they are in the runtime CLASSPATH of your project.

See the following steps to configuring BTT message with JMS implementation

  1. Configure on the server side. When using BTT Message with JMS implementation, no specific BTT configuration is needed. But BTT Message will communicate with the JMS provider on server side, so you need configure the JMS Provider in WAS. See the following steps:
    1. Configure the System Integration Bus in WAS.
    2. Configure the JMS Provider in WAS.
    3. Configure the Queue Connection Factory.
    4. Configure the Message Queue in WAS
  2. Configure on the client side. Initialize com.ibm.btt.msg.jms.JmsMessageDispatcher and com.ibm.btt.msg.jms.JmsListenerManager on client side. You can do this with BTT Elementfactory. See the following example:
    <bttmessage.xml>
      <com.ibm.btt.msg.jms.JmsMessageDispatcher id="msgMessageDispatcher" InitMethod="initialize">
        <ref refId="jmsConfig" Injection="jmsConfig" />
      </com.ibm.btt.msg.jms.JmsMessageDispatcher>
      <com.ibm.btt.msg.jms.JmsListenerManager id="msgListenerManager"	InitMethod="initialize">
        <ref refId="jmsConfig" Injection="jmsConfig" />
      </com.ibm.btt.msg.jms.JmsListenerManager>
      <com.ibm.btt.msg.jms.JmsConfig id="jmsConfig"
        initialContextFactory="com.ibm.websphere.naming.WsnInitialContextFactory"
        providerUrl="iiop://localhost:2809" connectionFactory="jms/BTTQueueConnectionFactoryDF"
        destination="jms/BTTSendQDF" />
    </bttmessage.xml>
    Table 1.
    Parameter Description
    com.ibm.btt.msg.jms.JmsConfig It's a help class for JMS configuration
    initialContextFactory It's the initial JNDI context factory of WAS
    providerUrl It's the provider URL of the WAS JNDI
    connectionFactory It's the jndi of the queue factory that been configured in WAS
    destination It's the jndi of the queue you configured in WAS, BTT Message will use the queue to store the message.