May 11th, 2011, 10:10 PM
Spring JMS Integration with IBM MQ Series
Am novice when it comes to Spring JMS integration and so had some questions around it.
Am trying to integrate Spring with the MQ Series and believe that all my IBM MQ(Q Connection Factory and Queue) entries should be going inside my applicationcontext.xml file.
I have the applicationcontext file for ActiveMQ Implementation and just wanted to know what exactly an IBM MQ specific entries in App Contest file will look like. Questions are -
1. Do I need to have an MQ Series installed on the same machine where I am running my Spring Application.
2. I presume not, then what should be the entries for QueueConnectionFactory and Destination attributes in the ApplicationContext file.
Looking eagerly for the replies,
May 12th, 2011, 02:02 AM
If the deployment environment of your application WebSphere Application Server then you can safely use its capabilities of WebSphere MQ Messaging Provider. It looks like a bridge between an application that uses the JMS API, and by the MQ, which can be anywhere. Also, once I found the implementation of such bridge under JBOSS.
Total, in my Spring-context only defined standard beans on ConnectionFactory & Destinations. Aslo my application can work without any MQ-vendor - using only JMS.
Also, I think we can find, or write your own, such bridges to other MQs.
May 12th, 2011, 04:12 PM
Thanks Artem for the reply - I was looking more from the code snippet's perspective. If anyone have done it before, it's going to be ofa great help -
I am not going to use WebSpehere App Server to connect to IBM MQ. It's my Spring project which will directly connect to MQ.
This is the snippet of code, in ApplicationContext.xml file that serves it's purpose for ActiveMQ, I am looking for it's counterpart for IBM MQ.
<property name="brokerURL" value="tcp://localhost:61616" />
<constructor-arg value="mail.queue" />
<property name="connectionFactory" ref="connectionFactory" />
<property name="destination" ref="mailDestination" />
<property name="jmsTemplate" ref="jmsTemplate" />
I know the names of my MQQueueManager, Host Name, Port and also the name of my MQ Queue. I just need to fit it into right constructs.
Any help on this will truly be appreciated.
May 13th, 2011, 01:05 AM
May 13th, 2011, 07:02 AM
I think this can help you!
May 13th, 2011, 08:22 PM
Got it working,It works like a charm for me.