[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Fri Nov 10 15:32:51 EST 2006
User: msurtani
Date: 06/11/10 15:32:51
Modified: src/org/jboss/cache/interceptors
ReplicationInterceptor.java
OptimisticLockingInterceptor.java
OptimisticValidatorInterceptor.java
OptimisticNodeInterceptor.java
OptimisticReplicationInterceptor.java
Log:
Fixed BR deadlock issue on startup
Revision Changes Path
1.41 +3 -1 JBossCache/src/org/jboss/cache/interceptors/ReplicationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ReplicationInterceptor.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- ReplicationInterceptor.java 12 Sep 2006 12:52:07 -0000 1.40
+++ ReplicationInterceptor.java 10 Nov 2006 20:32:51 -0000 1.41
@@ -13,7 +13,7 @@
* 'side-ways' (see docs/design/Refactoring.txt).
*
* @author Bela Ban
- * @version $Id: ReplicationInterceptor.java,v 1.40 2006/09/12 12:52:07 msurtani Exp $
+ * @version $Id: ReplicationInterceptor.java,v 1.41 2006/11/10 20:32:51 msurtani Exp $
*/
public class ReplicationInterceptor extends BaseRpcInterceptor
{
@@ -23,6 +23,8 @@
InvocationContext ctx = cache.getInvocationContext();
GlobalTransaction gtx = ctx.getGlobalTransaction();
+ // bypass for buddy group org metod calls.
+ if (MethodDeclarations.isBuddyGroupOrganisationMethod(m.getMethodId())) return super.invoke(m);
boolean isLocalCommitOrRollback = gtx != null && !gtx.isRemote() && (m.getMethodId() == MethodDeclarations.commitMethod_id || m.getMethodId() == MethodDeclarations.rollbackMethod_id);
1.22 +129 -126 JBossCache/src/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticLockingInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- OptimisticLockingInterceptor.java 25 Aug 2006 14:10:07 -0000 1.21
+++ OptimisticLockingInterceptor.java 10 Nov 2006 20:32:51 -0000 1.22
@@ -12,10 +12,10 @@
import org.jboss.cache.GlobalTransaction;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.TransactionEntry;
+import org.jboss.cache.marshall.MethodCall;
import org.jboss.cache.marshall.MethodDeclarations;
import org.jboss.cache.optimistic.TransactionWorkspace;
import org.jboss.cache.optimistic.WorkspaceNode;
-import org.jboss.cache.marshall.MethodCall;
import java.lang.reflect.Method;
import java.util.Collection;
@@ -39,6 +39,9 @@
public Object invoke(MethodCall m) throws Throwable
{
+ // bypass for buddy group org metod calls.
+ if (MethodDeclarations.isBuddyGroupOrganisationMethod(m.getMethodId())) return super.invoke(m);
+
InvocationContext ctx = cache.getInvocationContext();
Object retval = null;
Method meth = m.getMethod();
@@ -47,7 +50,7 @@
if (m.getMethodId() == MethodDeclarations.lockMethodLocal_id)
{
log.warn("OptimisticLockingInterceptor intercepted a call to TreeCache._lock(). " +
- "This should NEVER be called if optimistic locking is used!! "+
+ "This should NEVER be called if optimistic locking is used!! " +
"Not allowing this call to proceed further down the chain.");
return retval;
}
@@ -115,7 +118,7 @@
throw t;
}
break;
- default :
+ default:
//we do not care
retval = super.invoke(m);
break;
1.37 +5 -2 JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticValidatorInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- OptimisticValidatorInterceptor.java 6 Nov 2006 23:34:09 -0000 1.36
+++ OptimisticValidatorInterceptor.java 10 Nov 2006 20:32:51 -0000 1.37
@@ -46,6 +46,9 @@
{
public Object invoke(MethodCall m) throws Throwable
{
+ // bypass for buddy group org metod calls.
+ if (MethodDeclarations.isBuddyGroupOrganisationMethod(m.getMethodId())) return super.invoke(m);
+
InvocationContext ctx = cache.getInvocationContext();
Transaction tx = ctx.getTransaction();
GlobalTransaction gtx = ctx.getGlobalTransaction();
@@ -70,7 +73,7 @@
case MethodDeclarations.rollbackMethod_id:
rollBack(gtx);
break;
- default :
+ default:
retval = super.invoke(m);
break;
}
1.31 +4 -1 JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticNodeInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- OptimisticNodeInterceptor.java 22 Sep 2006 16:27:55 -0000 1.30
+++ OptimisticNodeInterceptor.java 10 Nov 2006 20:32:51 -0000 1.31
@@ -35,6 +35,9 @@
{
public Object invoke(MethodCall m) throws Throwable
{
+ // bypass for buddy group org metod calls.
+ if (MethodDeclarations.isBuddyGroupOrganisationMethod(m.getMethodId())) return super.invoke(m);
+
InvocationContext ctx = cache.getInvocationContext();
Object[] args = m.getArgs();
@@ -124,7 +127,7 @@
break;
case MethodDeclarations.dataGravitationCleanupMethod_id:
result = super.invoke(m);
- default :
+ default:
if (log.isInfoEnabled()) log.info("Cannot Handle Method " + m);
break;
}
1.27 +5 -2 JBossCache/src/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticReplicationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- OptimisticReplicationInterceptor.java 30 Aug 2006 17:08:18 -0000 1.26
+++ OptimisticReplicationInterceptor.java 10 Nov 2006 20:32:51 -0000 1.27
@@ -34,6 +34,9 @@
public Object invoke(MethodCall m) throws Throwable
{
+ // bypass for buddy group org metod calls.
+ if (MethodDeclarations.isBuddyGroupOrganisationMethod(m.getMethodId())) return super.invoke(m);
+
InvocationContext ctx = cache.getInvocationContext();
Option optionOverride = ctx.getOptionOverrides();
if (optionOverride != null && optionOverride.isCacheModeLocal() && ctx.getTransaction() == null)
@@ -72,7 +75,7 @@
//if we have an exception then the remote methods failed
if (retval instanceof Throwable)
{
- throw (Throwable) retval;
+ throw(Throwable) retval;
}
}
break;
@@ -122,7 +125,7 @@
throw temp2;
}
break;
- default :
+ default:
//it is something we do not care about
log.debug(" received method " + m + " not handling");
retval = super.invoke(m);
More information about the jboss-cvs-commits
mailing list