User: allsopp
Date: 01/02/04 17:46:14
Modified: src/main/org/jboss/ejb/plugins TxInterceptorBMT.java
Log:
Fixed a bug whereby an unterminated BMT would infect other beans
because the thread was left associated with the transaction in the
case where there was no previous transaction.
I like bug fixes that are simply removing code :-)
Revision Changes Path
1.13 +6 -9 jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java
Index: TxInterceptorBMT.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TxInterceptorBMT.java 2001/01/30 15:59:14 1.12
+++ TxInterceptorBMT.java 2001/02/05 01:46:14 1.13
@@ -50,7 +50,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
* @author Peter Antman ([EMAIL PROTECTED])
-* @version $Revision: 1.12 $
+* @version $Revision: 1.13 $
*/
public class TxInterceptorBMT
extends AbstractInterceptor
@@ -303,15 +303,12 @@
// Reset user Tx
userTransaction.set(oldUserTx);
- if (t1 != null) {
+//DEBUG Logger.debug("TxInterceptorBMT reassociating client tx " +
+//DEBUG t1.hashCode());
- // DEBUG Logger.debug("TxInterceptorBMT reassociating client tx " +
t1.hashCode());
-//DEBUG Logger.debug("TxInterceptorBMT reassociating client tx " +
t1.hashCode());
-
- // reassociate the previous transaction before returning
- tm.associateThread(t1);
-
- }
+ // reassociate the previous transaction before returning,
+ // even if it was null
+ tm.associateThread(t1);
if (((SessionMetaData)container.getBeanMetaData()).isStateless()) {