Prerequisites for the JMS adapter with IBM WebSphere MQ

You must perform the following procedures to use the JMS adapter with the IBM WebSphere MQ application:

  1. Copy the MQ client JAR files to the BMC Atrium Orchestrator peers on which the JMS monitor and actor adapters are enabled.
  2. Create a JMS .bindings file.
  3. Check the .bindings file for the localhost entries and copy it to the BMC Atrium Orchestrator peer.

To copy the MQ client JAR files to the BMC Atrium Orchestrator peers


Copy the .jar files from the IBM WebSphere MQ computer to the BMC Atrium Orchestrator peer-enabled computer.

  • The default path for the JAR files on the IBM WebSphere MQ computer is:
    C:\Program Files\IBM\WebSphere MQ\java\lib.
  • Copy the JAR files on the following path on the BMC Atrium Orchestrator peer-enabled computer:
    AO_HOME\tomcat\webapps\baocdp\WEB-INF\lib.

You must copy the following JAR files:

  • com.ibm.mq.jar
  • com.ibm.mq.jmqi.jar
  • com.ibm.mqjms.jar
  • connector.jar
  • dhbcore.jar
  • fscontext.jar
  • jms.jar
  • jndi.jar
  • jta.jar
  • ldap.jar
  • providerutil.jar

To create the JMS .bindings file

  1. Create an empty folder (for example, C:\MQJMSBindings) on the computer where the IBM WebSphere MQ application is installed.
  2. On the IBM WebSphere MQ application Explorer page, drill down to IBM WebSphere MQ > JMS Administered Objects.
  3. To create the default bindings file, right-click JMS Administered Objects, select Add Initial Context, and browse to the empty folder created in step 1.
  4. Navigate to JMS Administered Objects > Connection Factory.
  5. Right-click Connection Factory and then select New > Connection Factory to create a new Connection Factory. For example, BAOJMSConnection.
  6. Select the following values:
    • In Message Provider, select WebSphereMQ.
    • In Type, select Connection Factory.
    • In Transport, select MQ Client.
  7. Change the value of Connection list to the IP address of the IBM WebSphere MQ server.
  8. Create two JMS queues to send and receive queues using the JMS adapter .
    1. Open the IBM Websphere MQ application Explorer page.
    2. Select Queue Manager > Queues > New > localQueue, and create a queue with any name.

To check the .bindings file for the localhost entries and copy it to the BMC Atrium Orchestrator peer

  1. Open the .bindings file in a Notepad, search for localhost, and replace all instances of localhost with the IP address of the IBM WebSphere MQ server.
  2. Save the file and copy the directory containing the .bindings file to the root of the BMC Atrium Orchestrator peer.
  3. Restart the BMC Atrium Orchestrator peer to use the new MQ client JAR files.
  4. Configure the JMS actor and the JMS monitor adapter on Grid Manager using the XML samples shown in XML sample of the JMS actor adapter configuration for the WebSphere MQ server and XML sample of the JMS monitor adapter configuration for the WebSphere MQ server.

The following figure shows an XML sample for the JMS actor adapter configuration for using a WebSphere MQ server.

XML sample of the JMS actor adapter configuration for the WebSphere MQ server

<config>
  <jndi>
     <java.naming.factory.initial>com.sun.jndi.fscontext.RefFSContextFactory
     </java.naming.factory.initial>
     <java.naming.provider.url>file:///export/home/user2/CDP/MQJMSBindings
     </java.naming.provider.url>
  </jndi>
  <user-name>username1</user-name>
  <password>password</password>
<connection-factory>BAOJMSConnection</connection-factory>
</config>



The following figure shows an XML sample for the JMS monitor adapter configuration for using the WebSphere MQ server.

XML sample of the JMS monitor adapter configuration for the WebSphere MQ server

<config>
  <jndi>
     <java.naming.factory.initial>com.sun.jndi.fscontext.RefFSContextFactory
     </java.naming.factory.initial>
     <java.naming.provider.url>file:///export/home/user2/CDP/MQJMSBindings/
     </java.naming.provider.url>
  </jndi>
  <user-name>username</user-name>
  <password>password</password>
  <connection-factory>BAOJMSConnection</connection-factory>
  <queues>
    <queue>
      <destination-context-name>JMSMQTestRecieve</destination-context-name>
      <message-class>com.realops.adapter.jms.message.TextMessageProcessor
      </message-class>
    </queue>
  </queues>
</config>



The following figure shows an XML sample of the JMS adapter request for using the WebSphere MQ server and the TextMessage message type. Use this adapter request XML when you create a custom process by using the Call Adapter activity in BMC Atrium Orchestrator Development Studio.

XML sample of the JMS request for the WebSphere MQ server and TextMessage

<jmsRequest>
   <expiration>0</expiration>
    <priority>4</priority>
    <correlation-id>id-100</correlation-id>
    <jms-type>Actortype</jms-type>
    <delivery-mode>PERSISTENT</delivery-mode>
 <dest>JMSMQTestRecieve</dest>
        <body>
    <text>text message to JMS</text>
    </body>
</jmsRequest>



The following figure shows another XML sample of the JMS request using the WebSphere MQ server and a combination of MapMessage and ByteMessage message types. Use this adapter request XML when you create a custom process by using the Call Adapter activity in BMC Atrium Orchestrator Development Studio.

XML sample of the JMS request for the WebSphere MQ server and a combination of MapMessage and BytesMessage

<jmsRequest>
   <expiration>0</expiration>
    <priority>4</priority>
    <correlation-id>id-100</correlation-id>
    <jms-type>Actortype</jms-type>
    <delivery-mode>PERSISTENT</delivery-mode>
    <dest>JMSMQTestRecieve</dest>
    <properties>
       <property>
          <name>Emp id</name>
          <value type="Integer">31100</value>
       </property>
       <property>
          <name>Emp Name</name>
          <value type="String">Mr. Bean</value>
       </property>
          <property>
          <name>Work hours</name>
          <value type="Float">38.87</value>
       </property>
    </properties>
    <body>
 <bytes>SGHGKJH87HCIU-</bytes>
    </body>
</jmsRequest>

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments