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

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Dec 20 13:17:41 EST 2007


Author: manik.surtani at jboss.com
Date: 2007-12-20 13:17:41 -0500 (Thu, 20 Dec 2007)
New Revision: 4900

Modified:
   core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
Log:
fixed skipping of read methods as well if suppress locking is true

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-12-20 18:03:29 UTC (rev 4899)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-12-20 18:17:41 UTC (rev 4900)
@@ -19,6 +19,7 @@
 import org.jboss.cache.lock.LockingException;
 import org.jboss.cache.lock.NodeLock;
 import org.jboss.cache.lock.TimeoutException;
+import org.jboss.cache.marshall.MethodDeclarations;
 import org.jboss.cache.transaction.GlobalTransaction;
 import org.jboss.cache.transaction.TransactionEntry;
 import org.jboss.cache.transaction.TransactionTable;
@@ -113,6 +114,11 @@
       return nextInterceptor(ctx);
    }
 
+   protected boolean skipMethodCall(InvocationContext ctx)
+   {
+      return (ctx.getOptionOverrides() != null && ctx.getOptionOverrides().isSuppressLocking() && !MethodDeclarations.isPutMethod(ctx.getMethodCall().getMethodId()));
+   }
+
    protected Object handleLockMethod(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType, boolean recursive) throws Throwable
    {
       acquireLocksWithTimeout(ctx, fqn, lockType, false, false, false, false);




More information about the jbosscache-commits mailing list