-
Bug
-
Resolution: Done
-
Major
-
None
-
None
The JCA lazy initialization does not work in the following sceanrio
*********************************************************************
DataSource ds = ...
Connection c = ds.getConnection();
UserTransaction ut = ...
ut.begin();
// Do work
c = ds.getConnection(); // This should be avoided and looks antipattern.
ut.commit();
ut.begin();
*********************************************************************
Getting the connection again in the TX context causes the issue, the subsequent
ds.getConnection() leads to multiple enlistment of the local XAResources
and thus causing this warning
http://www.jboss.org/community/wiki/Multiple1pc
The application developers should not follow the above coding pattern, however we should fix the issue cropping due to this coding practice as it could lead some misbehaviour in container, there are no evidences about the misbehaviour but it had been reported by our customers.
- is incorporated by
-
JBPAPP-2845 Back Porting of (Lazy initialization fix for wrong use case.)
- Closed
- relates to
-
JBJCA-393 Lazy initialization
- Closed