Creating the JMS queues

The JMS transport protocol uses JMS queues to hold the JMS messages passed between Business Integration Connect and the back-end system. With WebSphere MQ version 5.3, creation of the JMS queues involves the following steps:

  1. Creating the MQ queue manager
  2. Creating the MQ channels and transmission queue
  3. Creating the MQ JMS local queues

Creating the MQ queue manager

If you have not already defined a queue manager for Business Integration Connect and the back-end system, you must do so before creating the MQ JMS queues. You will need a queue manager if you are doing JMS integration. You must decide whether to install a new queue manager or to use an existing one. An existing queue manager can be the same queue manager as Business Integration Connect, the same queue manager as the back-end system, or another existing queue manager. Refer to the WebSphere MQ documentation for instructions on how to create a queue manager.

Note:
If your back-end system and Business Integration Connect reside on different machines, the queue manager can reside either machine. Both Business Integration Connect and the back-end system specify the machine host name when they access the queue manager.

The samples in this chapter assume that a WebSphere MQ queue manager exists and is named as follows:

bcg.queue.manager

Creating the MQ channels and transmission queue

Once the queue manager exists, make sure that the following objects are created:

To create the MQ channels and transmission queue, use the WebSphere MQ Command Environment, runmqsc, which WebSphere MQ provides. This tool provides a command-line interface for you to enter queue-management commands.

Note:
The way you create these MQ objects depends on the platform you are using. Refer to the WebSphere MQ documentation for instructions on creating these objects.

To use runmqsc tool to create your MQ channels and transmission queue, follow these steps:

  1. Open a command prompt and move to the following directory:
    WebSphereMQ_Root\java\bin
    

    where WebSphereMQ_Root is the installation directory of WebSphere MQ.

  2. Enter the following command to start the WebSphere MQ Command Environment:
    runmqsc queueManager
    

    where queueManager is the name of your WebSphere MQ queue manager.

    Note:
    You must be logged in as the mqm user to use the runmqsc tool.
  3. At the runmqsc command line, you can enter the following commands:
    1. Define a JMS transmission queue:
      define qlocal(transQueueName) usage(xmitq) put(enabled)
         get(enabled)
      

      where transQueueName is the desired name of your JMS transmission queue.

    2. Define a sender channel:
      define channel(sndrChannelName) chltype(sdr) xmitq(transQueueName)
         conname('remote m/c ip')
      stop channel(sndrChannelName)
      

      where sndrChannelName is the desired name of your JMS sender channel andtransQueueName is the name of the JMS transmission queue you created in step 3a.

    3. Define a receiver channel:
      define channel(rcvrChannelName) chltype(rcvr) xmitq(transQueueName)
      stop channel(rcvrChannelName)
      

      where rcvrChannelName is the desired name of your JMS receiver channel andtransQueueName is the name of the JMS transmission queue you created in step 3a.

  4. You can leave your WebSphere MQ Command Environment open, as you will need it for subsequent queue-management commands.

Figure 30 shows the creation of sample JMS channels and a transmission queue hosted by the bcg.queue.manager queue manager.

Figure 30. Commands to create sample JMS channels and transmission queue

runmqsc bcg.queue.manager
   define qlocal(TRANSQ) usage(xmitq) put(enabled) get(enabled) 
   define channel(SENDER) chltype(sdr) xmitq(TRANSQ) 
      conname('remote m/c ip')
   stop channel(SENDER)
   define channel(RECEIVER) chltype(rcvr)
   stop channel(RECEIVER)

The commands in Figure 30 create the following MQ objects:

Creating the MQ JMS local queues

To create the MQ JMS local queues, use the WebSphere MQ Command Environment, runmqsc.

Note:
You must create these MQ JMS queues on the machine on which Business Integration Connect resides.

To use the runmqsc tool to create your local MQ queues, follow these steps:

  1. At the runmqsc command line, you can enter the following commands:
    1. Define the JMS inbound queue, which receives messages from the back-end system:
      define qlocal(inQueueName)
      

      where inQueueName is the desired name of your JMS inbound queue.

    2. Define the JMS outbound queue, which sends messages to the back-end system:
      define qlocal(outQueueName)
      

      where outQueueName is the desired name of your JMS outbound queue.

  2. Exit the WebSphere MQ Command Environment:
    end
    

    You can leave your command prompt open, as you will need it in subsequent configuration steps.

Note:
If your interactions with Business Integration Connect involve only one direction of communication with the back-end system, you can create only the queue for the direction Business Integration Connect will support.

Figure 31 shows the creation of sample JMS queues hosted by the bcg.queue.manager queue manager.

Figure 31. Commands to create sample JMS queues

   define qlocal(JMSIN)
   define qlocal(JMSOUT)
 

The commands in Figure 31 create the following JMS queues:

Copyright IBM Corp. 2003, 2004