0 Replies Latest reply on Jun 1, 2003 11:03 PM by Thomas Cherel

    WebSphere MQ 5.3, JBoss 3.0.5 and XA

    Thomas Cherel Novice


      I added WebSphere MQ 5.3 as a new JMS provider in JBoss (see by last post in http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= for details). Everything is working great.

      I am now trying to make it work with XA: I am trying to have an MDB listening to WebSphere MQ and using Container managed XA transaction: as part of the MDB transaction (receiving a message) I am sending a message to a JBoss MQ and I want both (receiving the message through the MDB and sending on to a JBoss queue) within the same transaction.
      I am at the point where everything is deployed correctly, but the MDB does not seem to receive any messages (although I can see that the WebSphere MQ queue contains some).

      I am wondering if there is anything I must do on the JMS XA Resource adapter side to make it work with the WebSphere MQ JMS provider (I did not replace the default JMS provider by the WebSphere MQ one, I have both providers at the same time).

      I am also wondering it the JNI code used by the WebSphere MQ client is causing any issues. It seems that to do XA with JMS for WebSphere MQ I must use a specific connection protocol which is using JNI (and also requiring the WebSphere MQ server to be on the same machine as JBoss).

      Anyone with any similar experience or any suggestions?

      Any help will be appreciated. Thanks.

      Thomas

      My post in http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= describes how the WebSphere MQ JMS provider has been configured in JBoss.

      This is the ejb-jar.xml of my MDB:
      <ejb-jar>
      <enterprise-beans>
      <message-driven>

      <ejb-name>MDB</ejb-name>
      <ejb-class>jms.simple.MDB</ejb-class>
      <message-selector></message-selector>

      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>

      <resource-ref>
      The Response Queue ConnectionFactory
      <res-ref-name>jms/ManagedQueueConnectionFactory</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      <resource-ref>
      The Response Queue
      <res-ref-name>jms/ManagedResponseQueue</res-ref-name>
      <res-type>javax.jms.Queue</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </enterprise-beans>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>MDB</ejb-name>
      <method-name>onMessage</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>


      And here is the jboss.xml of the MDB:


      <resource-managers>
      <resource-manager>
      <res-name>queuefactoryref</res-name>
      <res-jndi-name>java:/JmsXA</res-jndi-name>
      </resource-manager>
      <resource-manager>
      <res-name>queueref</res-name>
      <res-jndi-name>queue/ResponseQueue</res-jndi-name>
      </resource-manager>
      </resource-managers>

      <enterprise-beans>
      <message-driven>
      <ejb-name>MDB</ejb-name>
      <configuration-name>MQSeries Message Driven Bean</configuration-name>
      <destination-jndi-name>queue/MQRequestQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>jms/ManagedQueueConnectionFactory</res-ref-name>
      <resource-name>queuefactoryref</resource-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jms/ManagedResponseQueue</res-ref-name>
      <resource-name>queueref</resource-name>
      </resource-ref>
      </message-driven>
      </enterprise-beans>