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

Manik Surtani manik at jboss.org
Mon Apr 2 19:28:22 EDT 2007


  User: msurtani
  Date: 07/04/02 19:28:22

  Modified:    src/org/jboss/cache/interceptors  
                        OptimisticCreateIfNotExistsInterceptor.java
                        OptimisticNodeInterceptor.java
  Log:
  Fixed notification errs that came up in the process of refactoring.
  
  Revision  Changes    Path
  1.47      +1 -1      JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticCreateIfNotExistsInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -b -r1.46 -r1.47
  --- OptimisticCreateIfNotExistsInterceptor.java	29 Mar 2007 16:02:58 -0000	1.46
  +++ OptimisticCreateIfNotExistsInterceptor.java	2 Apr 2007 23:28:22 -0000	1.47
  @@ -192,7 +192,7 @@
                  workspaceNode.markAsCreated();
                  // save in list so we can broadcast our created nodes outside
                  // the synch block
  -               nodesCreated.add(currentFqn);
  +               nodesCreated.add(workspaceNode.getFqn());
               }
               else
               {
  
  
  
  1.61      +5 -5      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.60
  retrieving revision 1.61
  diff -u -b -r1.60 -r1.61
  --- OptimisticNodeInterceptor.java	30 Mar 2007 14:02:09 -0000	1.60
  +++ OptimisticNodeInterceptor.java	2 Apr 2007 23:28:22 -0000	1.61
  @@ -122,7 +122,7 @@
                  result = putDataKeyValueAndNotify(key, value, workspace, workspaceNode);
                  break;
               case MethodDeclarations.removeNodeMethodLocal_id:
  -               result = removeNodeAndNotify(workspace, workspaceNode);
  +               result = removeNode(workspace, workspaceNode, true);
                  break;
               case MethodDeclarations.removeKeyMethodLocal_id:
                  Object removeKey = args[2];
  @@ -249,7 +249,7 @@
         recursiveMoveNode(node, parent.getFqn(), ws);
   
         // remove old nodes. this may mark some nodes which have already been moved as deleted
  -      removeNodeAndNotify(ws, node);
  +      removeNode(ws, node, false);
   
         // post-notify
         notifier.notifyNodeMoved(nodeFqn, nodeNewFqn, false, false);
  @@ -308,7 +308,7 @@
         return old;
      }
   
  -   private boolean removeNodeAndNotify(TransactionWorkspace workspace, WorkspaceNode workspaceNode) throws CacheException
  +   private boolean removeNode(TransactionWorkspace workspace, WorkspaceNode workspaceNode, boolean notify) throws CacheException
      {
         // it is already removed - we can ignore it
         if (workspaceNode == null) return false;
  @@ -318,7 +318,7 @@
         if (parentNode == null) throw new NodeNotExistsException("Unable to find parent node with fqn " + parentFqn);
   
         // pre-notify
  -      notifier.notifyNodeRemoved(workspaceNode.getFqn(), true, workspaceNode.getData(), false);
  +      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), true, workspaceNode.getData(), false);
   
         parentNode.removeChild(workspaceNode.getFqn().getLastElement());
   
  @@ -340,7 +340,7 @@
         }
   
         // post-notify
  -      notifier.notifyNodeRemoved(workspaceNode.getFqn(), false, null, false);
  +      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), false, null, false);
         return true;
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list