Results 1 to 6 of 6

Thread: Spring JMS Integration with IBM MQ Series

  1. #1

    Default 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,
    Thanks,
    Sharad

  2. #2
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    644

    Default

    Hello.
    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.

    Good luck
    Artem

  3. #3

    Default

    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.
    <beans ...>
    <bean id="connectionFactory"
    class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="tcp://localhost:61616" />
    </bean>
    <bean id="mailDestination"
    class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="mail.queue" />
    </bean>
    <bean id="jmsTemplate"
    class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="connectionFactory" />
    </bean>
    <bean id="frontDesk"
    class="com.apress.springrecipes.post.FrontDeskImpl ">
    <property name="destination" ref="mailDestination" />
    <property name="jmsTemplate" ref="jmsTemplate" />
    </bean>
    </beans>

    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.
    Thanks,
    Sharad

  4. #4
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    644

  5. #5

    Default

    I think this can help you!
    Outlook Calendar

  6. #6

    Default

    Got it working,It works like a charm for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •