Webmethods ConnectingtoJMSonMQNatively

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Connecting to JMS on MQ Natively

1. First, from MQ Install, copy the following files to Integration


Server_directory\lib\jars:
WebSphereMQ\Java\lib\com.ibm.mq.jar
WebSphereMQ\Java\lib\com.ibm.mqjms.jar
For WebSphere MQ 6.0, you must also copy the
WebSphereMQ\Java\lib\dhbcore.jar file
2. Then, from http://www1.ibm.com/support/docview.wss?rs=203&uid=swg24004684&loc=en_US&cs=ut
f-8&lang=en, download mqcontext.jar and install it into Integration
Server_directory\lib\jars and WebSphereMQ\Java\lib\.
3. Then, obtain "com.ibm.mq.pcf-6.0.3.jar" from MQ's extended client installation,
not in the default MQ installation and install it into Integration
Server_directory\lib\jars and WebSphereMQ\Java\lib\.
4. Restart MQ and IS.
5. I have a Queue called Requests Under QueueManager MyQ defined as
follows

6. Under IS Admin Messaging, First create a JNDI Provider Alias as follows if


JNDI authentication is required, the security principal and security credentials are
entered as well as the other properties:
java.naming.security.authentication=simple which will send the supplied
credentials to MQ.

Connecting to JMS on MQ Natively


7. Next, under Messaging -> JMS Settings, Create an Alias as follows

8. From developer, create a JMS trigger pointing to the Requests queue invoking a
very simple flow service

Connecting to JMS on MQ Natively


9. The receive service just takes pub.jms:JMSMessage as input and a simple
debug log statement -

10. Once you publish a message to the Queue (using Websphere MQ Explorer), you
will see your trigger kick off and write the message in the debug
log.

Connecting to JMS on MQ Natively

11. TO Put a message on the queue, disable the trigger and create another service that
invokes pub.jms.send

Connecting to JMS on MQ Natively

The values for the inputs can be seen in the results pane on the right. The
body\string variable is whatever you want it to be.
12. Run that service and click Browse Messages from MQ
Explorer.

Connecting to JMS on MQ Natively

13. The more times you run the service, the more you should see.

You might also like