[jbosscache-commits] JBoss Cache SVN: r4742 - core/trunk/src/main/java/org/jboss/cache/interceptors.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Nov 9 06:47:55 EST 2007


Author: mircea.markus
Date: 2007-11-09 06:47:55 -0500 (Fri, 09 Nov 2007)
New Revision: 4742

Modified:
   core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
Log:
fixed following issue on lock acquisition : if createIfNorExist, try acquire a lock untill it exists, disregarding the fact that it was deleted or not.

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-11-09 02:00:46 UTC (rev 4741)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-11-09 11:47:55 UTC (rev 4742)
@@ -193,7 +193,7 @@
                created = lock(ctx, fqn, lock_type, recursive, createIfNotExists, timeout, isDeleteOperation, isEvictOperation, isRemoveDataOperation);
                firstTry = false;
             }
-            while (createIfNotExists && cache.peek(fqn, false) == null);// keep trying until we have the lock (fixes concurrent remove())
+            while (createIfNotExists && cache.peek(fqn, true) == null);// keep trying until we have the lock (fixes concurrent remove())
          }
       }
       else if (!lockNecessary)




More information about the jbosscache-commits mailing list