Shelby's Blog
How to use MQ JMSJCA to connect to IBM WebSphere Message Queue 6.0 in 5.1.3 Java CAPS
Instructions on how to use MQ JMSJCA to connect to IBM WebSphere Message Queue 6.0 in 5.1.3 Java CAPS
In the Environment->WebSphereMQ->Configuration
1) Use the "IBM MQ Message Server URL" field to specify a host name and a port number. For example:
wmq://localhost:1414
Content of the "QueueManager" field will be appended to the "IBM MQ Message Server URL field" to form a complete URL
wmq://[hostname]:[port]?QueueManager=[queue manager name]&option1=value1&option2=value2
2) Use the "QueueManager" field to specify the name of a queue manager. For example:
QM_myQMgr
3) If you want to add options to the URL, you have to add them to the "QueueManager" field. For example to turn off XA and to switch to the "binding" mode, type the following in the "QueueManager" field:
QM_myQMgr&JMSJCA.NoXA=true&TransportType=JMSC.MQJMS_TP_BINDINGS_MQ
In the above you need to replace QM_myQMgr with the name of a real queue manager. And for the rest, you need to type exactly as shown. Options are separated by the "&" character which is "&" in HTML. The following options are supported:
TransportType
Channel
JMSJCA.NoXA
The default transport type is "client" TCP, if you do not have
TransportType=JMSC.MQJMS_TP_BINDINGS_MQ
option in the "QueueManager" field.
The default transaction mode is XA if you do not have the
JMSJCA.NoXA=true
option in the "QueueManager" field.
3) The "TransportType" field in the GUI is ignored due to a defact. It does not matter what
you enter here. You have to use the "QueueManager" field to switch to the "binding" mode.
4) Before deploying your project, copy the following jar files to
* com.ibm.mqjms.jar
* com.ibm.mq.jar
* com.ibm.mqetclient.jar
* dhbcore.jar
com.ibm.mqetclient.jar is not needed for "binding" mode.
5) MQ JMS supports JMS API. You can use it just like a normal JMS server. However you have to use tools provided by IBM (e.g., MQ Explorer) to monitor the MQ. Enterprise Manager management functionality is not supported for WebSphere MQ. Only JMQ, Grid and STCMS are supported.
Posted at 01:27PM Jan 24, 2008 by Shelby in Sun | Comments[1]
Hi Shelby,
I followed the steps that you listed above, and i am able to successfully send the message to the MQ queue (which is confirmed by seeing the curr. queue depth), but when i try to browse the message using the MQ Explorer, it shows no messages, Strange !!!
Also, i tried to receive message from the same queue, but no success.
Any inputs will be helpful. Thanks
Note: I am using, MQ 6.0 & JCAPS 5.1.3
Posted by Petro on February 26, 2008 at 08:44 PM PST #