Creating JMS destinations

You can create new JNDI destination definitions for the new Routing message endpoint JMS destination with the jndi://<DESTINATION> format.

Before you begin

Connect to the WebSphere® MQ system. For more information, see Connecting to the WebSphere MQ system

Procedure

To create a new JNDI destination, complete the following steps:

  1. Create the necessary WebSphere MQ destination queues for the new Routing message Endpoint JMS Destination. Run the WebSphere MW runmqsc command to define a local queue, for example:
    $runmqsc MB8QMGR
    DEFINE QL(<Queue Name>)
    END  

    Where MB8QMGR is the queue manager name used in this pattern, and <Queue Name> is the MQ destination queue name.

  2. Add the JNDI definition for new Routing message Endpoint destination.
    1. Edit the JMS.def file located in /home/virtuser/soapolicyjmsdef by adding the new JNDI definition. In the following example, a new JNDI definition is added for the JMS Routing message Endpoint jndi://<DESTINATION> along with existing mandatory JNDI definitions:
      $vi /home/virtuser/soapolicyjmsdef/JMS.def 
      
      # Define a QueueConnectionFactory 
      # Only parameters being overridden from their default values 
      # are specified. 
      # This sets up a MQ client binding. 
      
      DEF QCF(QCF) + 
      TRANSPORT(CLIENT) + 
      QMANAGER(MB8QMGR) + 
      HOSTNAME(127.0.0.1) + 
      PORT(2414) 
      
      # 
      
      DEF Q(REQUEST_IN) + 
      QUEUE(REQUEST_INQ) + 
      QMANAGER(MB8QMGR) 
      
      DEF Q(REPLY_OUT) + 
      QUEUE(REPLY_OUTQ) + 
      QMANAGER(MB8QMGR) 
      
      DEF Q(BACKOUT) + 
      QUEUE(SYSTEM.DEAD.LETTER.QUEUE) + 
      QMANAGER(MB8QMGR) 
      
      # Add new JNDI definition for Route Message Endpoint value 
      # jndi://<DESTINATION> set in the new policy doc 
      # Replacing <DESTINATION> and <Destination MQ QueueName> 
      # values with their actual values. 
      
      DEF Q(<DESTINATION>) + 
      QUEUE(<Destination MQ QueueName>) + 
      QMANAGER(MB8QMGR) 
      
      END 
    2. Save and close the JMS.def file.
    3. Run the following command to create the bindings definition:
         $/opt/mqm/java/bin/JMSAdmin < /home/virtuser/soapolicyjmsdef/JMS.def
      This creates the JNDI bindings definition file in /home/virtuser/JNDI-DIR/.bindings.

What to do next

Share the JMS connection information with external clients. For more information, see Sharing JMS connection information with external clients

Task Task

Feedback

Timestamp icon Last updated: Thursday, 3 July 2014
http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.soawmbwsrr.doc/topics/tsoa_managing_destinations.htm