[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Fri Dec 1 10:44:20 EST 2006
User: msurtani
Date: 06/12/01 10:44:20
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_3_0
PessimisticLockInterceptor.java
Log:
delete nodes marked for removal *before* releasing locks on them!!
Revision Changes Path
No revision
No revision
1.14.2.8 +9 -7 JBossCache/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PessimisticLockInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java,v
retrieving revision 1.14.2.7
retrieving revision 1.14.2.8
diff -u -b -r1.14.2.7 -r1.14.2.8
--- PessimisticLockInterceptor.java 30 Nov 2006 14:18:04 -0000 1.14.2.7
+++ PessimisticLockInterceptor.java 1 Dec 2006 15:44:20 -0000 1.14.2.8
@@ -34,7 +34,7 @@
* scope of the TX. When no TX is present, we keep track of the locks acquired during the current method and unlock
* when the method returns
* @author Bela Ban
- * @version $Id: PessimisticLockInterceptor.java,v 1.14.2.7 2006/11/30 14:18:04 msurtani Exp $
+ * @version $Id: PessimisticLockInterceptor.java,v 1.14.2.8 2006/12/01 15:44:20 msurtani Exp $
*/
public class PessimisticLockInterceptor extends Interceptor {
TransactionTable tx_table=null;
@@ -341,6 +341,14 @@
return;
}
+ // first remove nodes that should be deleted.
+ Iterator removedNodes = entry.getRemovedNodes().iterator();
+ while (removedNodes.hasNext())
+ {
+ Fqn f = (Fqn) removedNodes.next();
+ cache.realRemove(f, false);
+ }
+
// Let's do it in stack style, LIFO
List list=new LinkedList(entry.getLocks());
for(int i=list.size() - 1; i >= 0; i--) {
@@ -357,12 +365,6 @@
tx_table.remove(ltx);
tx_table.remove(gtx);
- Iterator removedNodes = entry.getRemovedNodes().iterator();
- while (removedNodes.hasNext())
- {
- Fqn f = (Fqn) removedNodes.next();
- cache.realRemove(f, false);
- }
}
More information about the jboss-cvs-commits
mailing list