No need, Clebert.
This is what happens:
For both JBossMQ and Messaging, the JCA layer creates a JMSManagedConnection instance that
delegates to java:/XAConnectionFactory, active JTA transaction or not.
If the JTA transaction is active, the XAResource instance (SpyXAResource for JBossMQ,
MessagingXAResource for Messaging) is enlisted with the transaction, otherwise it is,
obviously, not.
The difference in behavior becomes apparent when sending the message. JBossMQ session
tries to store the message with its SpyXAConnection's resource manager. The
SpyXAResourceManager instance doesn't see any xid (xid is null) so immediately sends
the message to the server. (SpyXAResourceManager line 115)
Messaging holds the message in its ResourceManager, associating it with a transaction that
will never commit.
So the difference is in the JMS implementation, not in the JCA layer, which is identical
in both cases, as Tim thoughtfully noticed.
Now the question is what behavior is correct. Well, the common sense says that there is no
active JTA transaction at the time of Session creation, the Session is NOT transacted, so
JBossMQ behavior is correct. I would treat the current Messaging behavior as a bug.
If you have spec paragraphs to throw at me, go ahead. I am still poring over specs.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968731#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...