User: danch
Date: 01/04/16 18:28:41
Modified: src/main/org/jboss/tm Tag: Branch_2_2 TxCapsule.java
Log:
prevent race condition and lock contention
Revision Changes Path
No revision
No revision
1.24.2.1 +9 -4 jboss/src/main/org/jboss/tm/TxCapsule.java
Index: TxCapsule.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/tm/TxCapsule.java,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -r1.24 -r1.24.2.1
--- TxCapsule.java 2001/02/09 18:56:17 1.24
+++ TxCapsule.java 2001/04/17 01:28:41 1.24.2.1
@@ -48,7 +48,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a>
*
- * @version $Revision: 1.24 $
+ * @version $Revision: 1.24.2.1 $
*/
class TxCapsule implements TimeoutTarget
{
@@ -380,6 +380,10 @@
} finally {
unlock();
+
+ // This instance is now ready for reuse (when we release the lock).
+ if (done)
+ releaseInstance(this);
}
}
@@ -425,6 +429,10 @@
}
} finally {
unlock();
+
+ // This instance is now ready for reuse (when we release the lock).
+ if (done)
+ releaseInstance(this);
}
}
@@ -1383,9 +1391,6 @@
// If using a special class, second constructor argument is now useless.
if (xidConstructor != null)
xidConstructorArgs[1] = null; // This now needs initializing
-
- // This instance is now ready for reuse (when we release the lock).
- releaseInstance(this);
}
/**
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development