Deploying JMS application to connect to the Service Integration Bus running on WebSphere Application Server traditional

To deploy the messaging applications that use the Java™ Messaging Service (JMS) to connect to the messaging engine that is running on WebSphere® Application Server traditional, you must add the wasJmsClient-2.0 and jndi-1.0 features to the server.xml file. If you want to perform a JNDI lookup, then you must add the jndi-1.0 feature. You must also define the connection factory and destination properties.

Before you begin

Ensure that you created a Liberty server on which you want to deploy the messaging application that uses JMS.

Important: The wasJmsClient-2.0 feature supports the features of both JMS 1.1 and JMS 2.0 specifications. However, you can choose to use the wasJmsClient-1.1 feature if you want to use only the features that are compliant with JMS 1.1 specification..

About this task

The wasJmsClient-2.0 feature provides support for applications that use Java Messaging Service 1.1 specifications.

Procedure

  • Add the wasJmsClient-2.0 features to the server.xml file.
    <featureManager>
        <feature>wasJmsClient-2.0</feature>
        <feature>jndi-1.0</feature>
    </featureManager>
  • Add the connection factory definitions to the server.xml file.
    • For Point-to-Point domain:
      <jmsQueueConnectionFactory jndiName="jndi_JMS_BASE_QCF">
          <properties.wasJms
          remoteServerAddress="localhost:7276:BootStrapBasicMessaging" 
          busName="Bus1"/>
      </jmsQueueConnectionFactory>
      
      <jmsQueue jndiName="jndi_INPUT_Q">
          <properties.wasJms queueName="QUEUE1" />
      </jmsQueue>
    • For Publish-Subscribe domain:
      <jmsTopicConnectionFactory jndiName="eis/tcf">
          <properties.wasJms
          clientID="defaultID" 
          remoteServerAddress="localhost:7276:BootStrapBasicMessaging" 
          busName="Bus1"/>
      </jmsTopicConnectionFactory>
      
      <jmsTopic jndiName="eis/topic1">
          <properties.wasJms topicName="Football" />
      </jmsTopic>
    • For message-driven beans
      Configure the activation specification property to all message-driven beans deployed in the Liberty server to connect to the messaging engine that is running on WebSphere Application Server traditional.
      <jmsActivationSpec id="PriceChangeAS">
           <properties.wasJms
      	destinationRef="jms/TriggerQ" 
      	remoteServerAddress="meserver.in.ibm.com:7276:BootStrapBasicMessaging busName="Bus1"/>
      </jmsActivationSpec>
      
      <jmsQueue id="jms/TriggerQ" jndiName="jms/TriggerQ">
           <properties.wasJms queueName="Q1"/>                  
       </jmsQueue>
      Note: If an application that is running on the Liberty server needs to connect to a messaging engine that is running on WebSphere Application Server traditional, then ensure that remoteServerAddress is configured to point to the server where the messaging engine is locally running instead of pointing to a Bootstrap server.