Please keep in mind that the IBM MQ adapter does not support remote XA without using the ET(Extended Transaction) client. Plese refer to the WebsphereMQIntegration about the mq client.
In order to be able to define an MQ adaper, you must be able to use Activation Configurations. This feature was not added until 4.3. https://jira.jboss.org/jira/browse/JBESB-1563
1. Copy the wmq.jmsra.rar from your mqm directory(On fedora it is /opt/mqm/java/lib/jca) to your deploy directory on your jboss app server.
2. Test your configuration to make sure it works using the IBM Install Verification tests. This will verify that you have your queue set up properly and will also verify that you know the correct settings. The instructions for configuring and running the IVT are here.
3. Add this to your configuration.
<jms-jca-provider name="WMQ-via-JCA" adapter="wmq.jmsra.rar"> .... <jms-bus busid="quickstartGwChannel"> <jms-message-filter dest-type="QUEUE" dest-name="WMQGateway" transacted="true" /> </jms-bus> <activation-config> <property name="channel" value="SYSTEM.DEF.SVRCONN" /> <property name="hostName" value="localhost" /> <property name="port" value="1414" /> <property name="queueManager" value="QM1" /> <property name="transportType" value="BINDINGS" /> <property name="useJNDI" value="true" /> <property name="username" value="user" /> <property name="password" value="user" /> </activation-config>
Here are some notes about this configuration.
a. The dest-name "WMQGateway" is a jboss defined queue that is defined as an admin object. You can see the admin object by looking at the IBM/JBoss Integration document with the section entitled, "Configuring JCA administered objects" . The admin object is a placeholder for more configuration information. it's not an actual queue on the jboss side, it's a pointer to the queue in Websphere MQ.
b. This sets the transportType to be Bindings. The other transport type you can have is CLIENT. Please look atWebsphereMQIntegrationto find out the difference between CLIENT and BINDINGS.
c. useJNDI is important. When you give the adpater a destination it will try to do something with it. If your destination is an Admin object registered in JNDI, then you want to set this to true. If the Destination is direct, then you will want to set this to false. If you set useJNDI to false, the adapter will consider the destination, the name of the IBM queue on the Server. This would negate the need for an admin object, but would not work well for JMS, becuase JMS relies on the ability to be able to have a concrete queue.
d. username and password are on there in case you protect your queues on the IBM MQ side.