From: SourceForge.net <no...@so...> - 2003-09-02 21:17:00
|
Bugs item #792120, was opened at 2003-08-20 19:21 Message generated for change (Settings changed) made by oravecz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=792120&group_id=22866 Category: JBossCX Group: v3.2 Status: Open Resolution: None >Priority: 8 Submitted By: Jim Cook (oravecz) Assigned to: Nobody/Anonymous (nobody) Summary: Local transaction broken when using pass-by-value Initial Comment: jBoss 3.2.2 branch, HEAD In order to get transactional support when using local- tx-datasource, each time a connection is fetched from the pool, the server is supposed to hand you the same underlying connection object as long as you are in the same transactional context (and on the same server, of course). I assume that the server uses some sort of ThreadLocal-type algorithm to keep this straight. Now, since switching to a pass-by-value configuration, it seems that the server is no longer handing back the same underlying connection. In fact, in a single J2EE "transaction" is creating 3 connections to the database. Since this is not an XA transactional setup, these connections are not actually transactional. They are also causing all kinds of deadlocks also, but that would be expected given the problem. I have attached a log4j output that demonstrates that a new connection to Sybase is created for every RMI thread in use. Since we are using pass-by-value JNDI, a new RMI thread is created every time we leave a deployment context. I had to move to pass-by-value to satisfy the class loading restrictions imposed by jBoss 3.2. ---------------------------------------------------------------------- Comment By: Jim Cook (oravecz) Date: 2003-08-27 20:22 Message: Logged In: YES user_id=6215 So does this imply that a new transaction is getting created (incorrectly) because of the pass-by-value semantics? How can I log details of the current transaction? ---------------------------------------------------------------------- Comment By: David Jencks (d_jencks) Date: 2003-08-22 03:34 Message: Logged In: YES user_id=60525 The local tx connection manager uses a tx to ManagedConnection map to keep track of the transaction to ManagedConnection association. I think it is unlikely that this is failing. If anyone investigates this, I would suggest starting by determining if the new "RMI thread" actually has the correct transaction associated with it. I don't know of any mechanism in JBoss 3.2 by which this could occur. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=792120&group_id=22866 |