I am using JmsXA conenction factory in JBM 1.2.SP2
Don't use JmsXA.
Why would you recommend not to use JmsXA, tim?
This would work with JBossMQ or SonicMQ ... I filed a bug on this but it was marked "Will Not Fix" or something.
JBossMessaging should ship with a JCA managed connected factory for non-transactional sends, if it doesn't already.
Would you remember the bug link, Genman?
Tim probably wouldn't want it reopened, so don't try:
Actually, looked like it was fixed, just moved to:
Though Tim said "Don't use JmsXA" like it didn't work, so I don't know why he said that.
The solution (if you want an immediate one) is to use the connection factory in JNDI under java:/ConnectionFactory -- though this is not pooled and I may have the name wrong.
Yes this was "fixed" in 1.3.0, so an XA session which is not enlisted in a JTA tx falls back to acting as non transacted (auto_ack).
The whole story is rather complex.
For some use cases (like the reported one) an XASession needs to act as non transacted when not enlisted in a tx.
But in other situations we have to act as transacted!
E.g. when the XASession is being used to consume messages for an MDB. In this case messages can be consumed by the connection consumer before the session is enlisted. In this case it needs to act as transacted so when the session is finally enlisted any work done before the enlisting is converted into the JTA tx.
So in other words, we have to somehow work out if the session is being used for an MDB (also for the message bridge) and act differently in that case.