views:

541

answers:

2

Does anyone know if there is an implementation of javax.jms.QueueConnectionFactory for MQSeries and where to get it? I Googled it and searched IBM website but couldn't find anything. I don't want to retrieve the connection or factory from Websphere MQ via jndi, I need my own connection factory.

+4  A: 

I think you need three jars

com.ibm.mq.jar
com.ibm.mqbind.jar
com.ibm.mqjms.jar

You instantiate a MQQueueConnectionFactory and i hope you can take it from there.

And here's more info: IBMs HOWTO

Oh, and MQ can do "real" JMS instead of MQ - only the JMS implementation seemed to have problems closing the Channel properly - at least in our environment.

Stroboskop
+2  A: 

Although Bobby's article referenced in the other response is good, I would want to use a more current version of the JMS classes than from 2005! Most of the development has been in enhancing JMS function and performance. The classes have been simplified and repackaged into fewer jars as well so it's easier to deploy.

I'd recommend going to the WMQ Infocenter for the version of JMS classes you have (6.0 or 7.0) and looking for the Using Java manual. Inside there is a section on environment variables. Make sure you have the jars listed in the CLASSPATH for your specific version. The infocenter is linked from here: http://www-01.ibm.com/software/integration/wmq/library/

If you can use the latest version, download the MQC7 SupportPac. This is the WMQ client code and includes the latest jars. That URL is: http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg27007197#1

Once you get the client installed, the sample code can be found in C:\Program Files\IBM\WebSphere MQ\tools\jms\samples\simple

T.Rob