How to Configure WebLogic Server with IBM WebSphere MQ V6 or V7 as a Foreign JMS Server in Two Different Machines

WebSphere MQ Information Center
WebSphere MQ Information Center (Photo credit: peter_anghelides)


Configuring WebSphere MQ

Please follow these steps:

  1. In the WebSphere MQ Explorer Navigator pane, click on the 'IBM WebSphere MQ' node to expand it.
  2. Create a queue manager by right clicking on the Queue Manager node and selecting New -> Queue Manager.
  3. In the opened window, enter the name MQTest in the Name text box. Ensure that you choose a port which is not already in use. Otherwise, accept the default options by clicking Next until you reach 'Finish' and finally click Finish. Keep a record of these settings as they will be used later in the configuration of the bindings.
  4. Right click on the Queues node under MQTest queue manager. Select New -> Local Queue.
  5. Enter 'MQSenderQueue' as the name for the local MQ queue. Click Next and Finish.
  6. Repeat the above two steps to create another local queue called 'MQReceiverQueue.'
  7. Create a new channel for the new MQTest Queue Manager.
    1. Expand Queue Managers -> MQTest -> Advanced -> Channels -> New -> Server-connection Channel
    2. Name: mysvrconnchannel
    3. Keep all other values as default.
    4. Click Next -> Finish.

Integrating Oracle WebLogic Server with Websphere MQ

Solution

  1. Download Websphere MQ from the following location and install it: http://www.ibm.com/developerworks/downloads/ws/wmq/
  2. Run the following command to create the necessary resources in MQ:
    Change directory to MQ_HOME/bin folder:
    - Create a MQ manager (Example: "COSI"):
    crtmqm COSI
    - Start the MQ Manager:
    strmqm COSI
    - Create local queue and channel:
    runmqsm
    DEFINE QLOCAL('DAVE') DEFPSIST(YES) //{Example: DAVE is the queuename}
    DEFINE CHANNEL(MAP.SVRCONN) CONNAME(SVRCONN) XMITQ(WW) //{Example: MAP.SVRCONN is the channel name}
    End
  3. Include weblogic.jar in the classpath and also include JRE in the path.
  4. Run the following command to start JMSAdmin: