Search code examples
jmsibm-mqjndiapache-servicemix

configure jndi.xml in serviceMix to work with MQseries


My j2EE app is currently running on ServiceMix. Now i want to add JMS to my app. The application should able to send/receive the JMS message to/from the queue that stays on MQSeries.

mq.hostname=10.3.6.19
mq.channel=CHANNEL
mq.queueManager=QManager
mq.port=1422

What i would like to do is:

 1. Create a jndi.xml file and do configuration for jms stuff.
 2. my app will initialize the context, look up jndi name, and create a connection, queueManager, queue. .etc
 3. Develop send and receive methods.

My question is: Can you tell me how to do 1st and 2nd steps. (the script inside ServiceMix's jndi is diffrent with tomcat's jndi and others. ServiceMix using Spring based JNDI provider. http://servicemix.apache.org/jndi-configuration.html)


Solution

  • I just ran into something similar with Weblogic. The following link uses spring-dm to integrate with websphere. It also takes it to the next logical step and adds camel to the mix. http://lowry-techie.blogspot.com/2010/11/camel-integration-with-websphere-mq.html

    Without using Spring-dm, you may run into classloader issues when trying to load the InitialContextFactory from the websphere jar (this is an issue I had with the Weblogic jar)