-
1. Re: Publishing a message in 'NotSupported' EJB
timfox Sep 19, 2007 6:59 AM (in response to mskonda)"mskonda" wrote:
I am using JmsXA conenction factory in JBM 1.2.SP2
Don't use JmsXA. -
2. Re: Publishing a message in 'NotSupported' EJB
mskonda Sep 19, 2007 7:03 AM (in response to mskonda)Why would you recommend not to use JmsXA, tim?
-
3. Re: Publishing a message in 'NotSupported' EJB
genman Sep 19, 2007 12:40 PM (in response to mskonda)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. -
4. Re: Publishing a message in 'NotSupported' EJB
mskonda Sep 19, 2007 12:49 PM (in response to mskonda)Would you remember the bug link, Genman?
Thanks
Madhu -
5. Re: Publishing a message in 'NotSupported' EJB
genman Sep 19, 2007 12:54 PM (in response to mskonda)Tim probably wouldn't want it reopened, so don't try:
http://jira.jboss.com/jira/browse/JBMESSAGING-410
Actually, looked like it was fixed, just moved to:
http://jira.jboss.com/jira/browse/JBMESSAGING-946
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. -
6. Re: Publishing a message in 'NotSupported' EJB
timfox Sep 20, 2007 9:24 AM (in response to mskonda)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.