Can you try this with 3.2.2RC2
There is a fix to solve
a race condition in the commit from suspended processing.
The race looks something like this:
Thread1 does some work
Thread1 suspends - Session.close()
Thread2 does work using same session
Thread1 commits - The XAResource mistakenly overwrites
the session's transaction id. It should not do this,
it is no longer associated with the session.
Thread2 throws an InvalidTransactionID exception
After much trial and error I think I got a combination that works. For sending the messages from within a transacted session bean, I use Context.lookup("java:/JmsXA") to get a TopicConnectionFactory. For clients listening on topic, I use Context.lookup("XAConnectionFactory") to get the TopicConnectionFactory. This combination seems for both successful completion of the transaction (commit) and when the transaction failes (rollback) .
The (OIL) XAConnectionFactory's XAResource
is not enlisted in the ejb transaction.