[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Bug in transactional delivery in an MDB
timfox
do-not-reply at jboss.com
Mon Jan 8 05:04:38 EST 2007
Weston - what is the correct behaviour of the JCA JMS managed connection factory here?
Just to recap:
If I obtain a session from a connection created from the JCA JMS managed cf (i.e. the one normally at java:/jmsXA), and there is *no* JTA transaction associated with the current thread, and I receive a message, should the session act like a non transacted session and the message get acknowledged immediately, OR should it act like a transacted session? This is the key question.
If it should act like a non transacted session, how can we reconcile this with transactional message receipt for MDBs?
In a MDB the message is received *before* the MDB container has a chance to start a global tx, therefore it is received in a session where no JTA tx is associated with the current thread. In this case we must *not* ack it immediately, but we must let the session behave as a transacted session and later when the MDB container starts a JTA tx and enlists it, we can transfer the work done in the local tx into the global tx.
Funnily enough - transferring the work into the JTA tx is exactly how JBoss MQ does it too, so I am puzzled as to how this behaviour is consistent with the behaviour of JCA without a JTA tx as Ovidiu reports. This is why I am trying to find out whether the supposed JCA behaviour is real or bogus.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998913#3998913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998913
More information about the jboss-dev-forums
mailing list