2 Replies Latest reply on Oct 3, 2011 1:00 PM by zecas

    JMS Bridge and JMS Provider Resource Adapter (JCA)

    bgillis

      Hi folks !

       

      I'm trying to setup a JMS bridge beween JBoss Messaging running inside JBoss 5.1.0 and WebSphere MQ 6.0.2 (WMQ) running as a standalone application.

       

      Our major requirement is to have a Quality of Service (QoS) QOS_ONCE_AND_ONLY_ONCE between both JMS Providers.

      This QoS requires that both connection factories must be XAConnectionFactory implementations.

       

      The recommended way to integrate a JMS Provider inside a J2EE server is always to use the available JMS Resource Adapter.

      So for WMQ, we must deploy wmq.jmsra.rar in JBoss AS as explained on this wiki page: http://community.jboss.org/wiki/UsingWebSphereMQSeriesWithJBossASPart4. And the JMS Bridge is working flawlessly when using QoS QOS_AT_MOST_ONCE and QOS_DUPLICATES_OK. But as soon as we use QoS QOS_ONCE_AND_ONLY_ONCE, the JMS Bridge doesn't start anymore and the following Exception is thrown.

       

      17:15:38,302 WARN  [Bridge] jboss.messaging:name=JMSBridge,service=Bridge Failed to set up connections
      java.lang.IllegalArgumentException: Connection factory must be XAConnectionFactory
              at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:880)
              at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:1015)
              at org.jboss.jms.server.bridge.Bridge.setupJMSObjectsWithRetry(Bridge.java:1223)
              at org.jboss.jms.server.bridge.Bridge.access$1600(Bridge.java:68)
              at org.jboss.jms.server.bridge.Bridge$FailureHandler.run(Bridge.java:1569)
              at java.lang.Thread.run(Thread.java:619)

       

      As a matter of fact, all JMS Resource Adaptors implement the ConnectionFactory interface only as described in the J2EE Connector Architecture
      Specification (JSR112). That's the case for IBM WMQ Resource Adaptor, Apache Active MQ Resource Adaptor and JBoss Messaging Resource Adaptor as well. 

       

      So how is it possible to use the QoS QOS_ONCE_AND_ONLY_ONCE in a JMS Bridge if it is not possible to obtain a XAConnectionFactory from a JMS Resource Adaptor ?

       

      Do we have to connect directly to the JMS Provider to obtain a XAConnectionFactory instead of using the JMS Provider resource Adaptor available ? If so, could you describe the procedure to follow ?

       

      Thank you very much for your assistance.

       

      Bertrand


        • 1. Re: JMS Bridge and JMS Provider Resource Adapter (JCA)

          Hi...

           

                 I am new to JBoss... my requirement is also to setup a JMS bridge beween JBoss Messaging running inside JBoss ESB Server 4.2.3 and WebSphere messaging(not MQ). can u please guide me in providing the steps to carry out the message bridging between Websphere and JBoss messaging... i have tried to step a JMS bridge between two instances of Jboss running on same machine.. it works fine... Please help on this...

          • 2. Re: JMS Bridge and JMS Provider Resource Adapter (JCA)
            zecas

            Hi,

             

            Anyone got over this?

             

            I want to test a bridge between MQ and JBoss Messaging, and some initial info or a place to start would be great.

             

            Anyone can post some config samples, or point somewhere with them? There is so many info around to filter.

             

            Thanks.