[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...

Manik Surtani manik at jboss.org
Fri Mar 16 18:07:03 EDT 2007


  User: msurtani
  Date: 07/03/16 18:07:03

  Modified:    src/org/jboss/cache/interceptors    Tag:
                        Branch_JBossCache_1_4_0
                        OptimisticReplicationInterceptor.java
                        DataGravitatorInterceptor.java
                        OptimisticNodeInterceptor.java
  Log:
  Patched problems with 1.4.1.SP3
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.21.2.6  +3 -3      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.21.2.5
  retrieving revision 1.21.2.6
  diff -u -b -r1.21.2.5 -r1.21.2.6
  --- OptimisticReplicationInterceptor.java	11 Dec 2006 17:29:44 -0000	1.21.2.5
  +++ OptimisticReplicationInterceptor.java	16 Mar 2007 22:07:03 -0000	1.21.2.6
  @@ -84,7 +84,7 @@
                     // pass up the chain.
                     retval = super.invoke(m);
   
  -                  if (!gtx.isRemote())
  +                  if (!gtx.isRemote() && getInvocationContext().isOriginLocal())
                     {
                         // replicate the prepare call.
                         retval = broadcastPrepare(m, gtx);
  @@ -98,7 +98,7 @@
                  case MethodDeclarations.commitMethod_id:
                     //lets broadcast the commit first
                     Throwable temp = null;
  -                  if (!gtx.isRemote() && broadcastTxs.containsKey(gtx))
  +                  if (!gtx.isRemote() && getInvocationContext().isOriginLocal() && broadcastTxs.containsKey(gtx))
                     {
                         //we dont do anything
                         try
  @@ -121,7 +121,7 @@
                  case MethodDeclarations.rollbackMethod_id:
                     //    lets broadcast the rollback first
                     Throwable temp2 = null;
  -                  if (!gtx.isRemote() && broadcastTxs.containsKey(gtx))
  +                  if (!gtx.isRemote() && getInvocationContext().isOriginLocal() && broadcastTxs.containsKey(gtx))
                     {
                         //we dont do anything
                         try
  
  
  
  1.16.2.4  +1 -1      JBossCache/src/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DataGravitatorInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/DataGravitatorInterceptor.java,v
  retrieving revision 1.16.2.3
  retrieving revision 1.16.2.4
  diff -u -b -r1.16.2.3 -r1.16.2.4
  --- DataGravitatorInterceptor.java	2 Nov 2006 15:34:06 -0000	1.16.2.3
  +++ DataGravitatorInterceptor.java	16 Mar 2007 22:07:03 -0000	1.16.2.4
  @@ -73,7 +73,7 @@
         // Transactional lifecycle methods should be handled regardless of whether data gravitation is enabled or not.
         if (!isTransactionLifecycleMethod(m))
         {
  -         if (isGravitationEnabled(getInvocationContext()))
  +         if (isGravitationEnabled(getInvocationContext()) && MethodDeclarations.isGetMethod(m.getMethodId()))
            {
               // test that the Fqn being requested exists locally in the cache.
               Fqn fqn = extractFqn(m.getMethodId(), m.getArgs());
  
  
  
  1.21.2.11 +9 -0      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.21.2.10
  retrieving revision 1.21.2.11
  diff -u -b -r1.21.2.10 -r1.21.2.11
  --- OptimisticNodeInterceptor.java	12 Mar 2007 19:07:47 -0000	1.21.2.10
  +++ OptimisticNodeInterceptor.java	16 Mar 2007 22:07:03 -0000	1.21.2.11
  @@ -69,6 +69,10 @@
            }
   
            WorkspaceNode workspaceNode = getOrCreateWorkspaceNode(getFqn(args), workspace, true);
  +         if (workspaceNode == null && m.getMethodId() == MethodDeclarations.dataGravitationCleanupMethod_id)
  +         {
  +            workspaceNode = getOrCreateWorkspaceNode(getBackupFqn(args), workspace, true);
  +         }
   
   
            if (workspaceNode != null)
  @@ -172,6 +176,11 @@
         return (Fqn) args[1];
      }
   
  +   private Fqn getBackupFqn(Object[] args)
  +   {
  +      return (Fqn) args[2];
  +   }
  +
      private void putDataMap(Object[] args, boolean eraseExisitng,
                              TransactionWorkspace workspace, WorkspaceNode workspaceNode)
      {
  
  
  



More information about the jboss-cvs-commits mailing list