The problem
Using JBoss EAP 4.3 as an application server, I had also setup the IBM JMS resource adapter so that JBoss could connect to Websphere MQ. The application used 2-phase commit (XA) transactions to read data from a DB2 database and submit the corresponding messages to Websphere MQ. It was noticed however that especially during times of heavy traffic, many messages never got received by the application at the other end.
Using the dspmqtrn control command on the MQ server revealed many in-doubt transactions. So it was obvious that transactions didn't get commited properly.
The solution
JCA connection factories for the Websphere MQ resource adapter are defined in a file named "wmq.jmsra-ds.xml" and located in the deploy directory of the JBoss server.
It turns out that for XA transactions in JBoss EAP 4.3 you have to include the following inside the <tx-connection-factory> element:
<xa-transaction />
<!-- Use a connection per transaction map -->
<track-connection-by-tx>true</track-connection-by-tx>
This is only required for JBoss EAP 4.3. From version 5.0 onwards this is the default and it doesn't need to be defined explicitly.