WRT JBossMQ bug http://jira.jboss.com/jira/browse/JBAS-5571
I don't know if you have the same issue? I just wanted to check.
JBossMQ has an optimization where if all messages in the transaction are non persistent
it doesn't write the XID to the log but does XA_OK from prepare()
which causes crash recovery problems since it doesn't return the XID from XAResource.recover() as the TM expects.
The obvious optimization is to return READ_ONLY if all messages are non persistent
(since no changes will go in the log) then you don't have a problem.
But for JBossMQ it's hard to do that change, so I had to disable this optimization
for XA transactions. :-(
The TS team raised this JIRA http://jira.jboss.org/jira/browse/JBMESSAGING-1282 a while back to remind us to check this.
We still need to do that.