Details
-
Bug
-
Resolution: Done
-
Major
-
JBoss A-MQ 6.0
-
None
-
None
Description
In some TCK tests, there is Stateful EJB. In ejbCreate() method, there is connection created by connection factory, which was looked up in jndi. This connection is stored in the object and used later in other methods.
Problem is, that by creating the connection, it's enlisted in XA transaction, when ejbCreate method ends, first transaction ends and org.apache.activemq.ra.LocalAndXATransaction field inManagedTx is set to false. When the connection is reused in other method call, inManagedTx is not set again to true and at the end of method, session created from this connection is rollbacked.
It's not recommended to cache connections in JEE environment, because these resources are pooled on app server side (so no significant performance loss when created again), but it seems to be valid use case (at least TCKs use it).
Attachments
Issue Links
- is related to
-
ENTMQBR-364 RAR - support session enlistment on cached connection (so transaction created after createConnection but before createSession)
- New
-
ENTMQ-278 Allow XAPooledConnectionFactory to be join an xa transaction - two connection factories in same arjuna jboss jta transaction
- Closed