Setting up the IMS adapter for use with IBM MQ classes for JMS/Jakarta Messaging

IBM® MQ classes for JMS and IBM MQ classes for Jakarta Messaging make use of the same IBM MQ-IMS adapter as used by other programming languages. This adapter uses the IMS External Subsystem Attach Facility (ESAF).

Before you begin

Before completing the following procedure, you must configure the IMS adapter for the relevant queue managers, and IMS control and dependent regions, as described in Setting up the IMS adapter.
Attention: You do not need to perform the step that describes building a dynamic stub, unless you need the dynamic stub for other purposes.

After you have configured the IMS adapter, carry out the following procedure.

Procedure

  1. Update the LIBPATH variable in the member of your IMS PROCLIB that is referenced by the ENVIRON parameter in your dependent region JCL (for example, DFSJVMEV) so that it includes the IBM MQ classes for JMS native libraries.
    That is, the zFS directory that contains libmqjims.so. For example, DFSJVMEV might look like the following, where the last line is the directory containing the IBM MQ classes for JMS or IBM MQ classes for Jakarta Messaging native libraries:
    
    LIBPATH=>
    /java/latest/bin/j9vm:> 
    /java/latest/bin:>
    /ims/latest/dbdc/imsjava/lib:> 
    /mqm/latest/java/lib 
    
  2. Add the IBM MQ classes for JMS or IBM MQ classes for Jakarta Messaging to the class path of the JVM, used by your IMS dependent region, by updating the java.class.path option.
    Do this by following the instructions in DFSJVMMS member of the IMS PROCLIB data set.

    For example, you can use the following, where the line in bold indicates the update:

    [Jakarta Messaging 3.0]
    
    -Djava.class.path=/ims/latest/dbdc/imsjava/imsutm.jar:/ims/latest/dbdc/imsjava/imsudb.jar:
    /mqm/latest/java/lib/com.ibm.mq.jakarta.client.jar
    
    [JMS 2.0]
    
    -Djava.class.path=/ims/latest/dbdc/imsjava/imsutm.jar:/ims/latest/dbdc/imsjava/imsudb.jar:
    /mqm/latest/java/lib/com.ibm.mq.allclient.jar
    
    Note: While there are many different jar files available in the directory containing the IBM MQ classes for JMS or IBM MQ classes for Jakarta Messaging, you need only com.ibm.mq.allclient.jar (JMS 2.0) or com.ibm.mq.jakarta.client.jar (Jakarta Messaging 3.0).
  3. Stop and restart any IMS dependent regions that will make use of the IBM MQ classes for JMS or IBM MQ classes for Jakarta Messaging.

What to do next

Create and configure connection factories and destinations.

There are three possible approaches for instantiating the IBM MQ implementations of connection factories and destinations. See Creating and configuring connection factories and destinations for details.

Note that these three approaches are all valid in an IMS environment.