[exo-jcr-commits] exo-jcr SVN: r2228 - jcr/branches/1.14.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Apr 8 07:39:53 EDT 2010


Author: tolusha
Date: 2010-04-08 07:39:53 -0400 (Thu, 08 Apr 2010)
New Revision: 2228

Modified:
   jcr/branches/1.14.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-609: small fix

Modified: jcr/branches/1.14.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.14.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-04-08 11:10:25 UTC (rev 2227)
+++ jcr/branches/1.14.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-04-08 11:39:53 UTC (rev 2228)
@@ -808,15 +808,8 @@
     */
    protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild)
    {
-
-      // remove possible NullNodeData from cache
-      boolean local = cache.isLocal();
-      cache.setLocal(false);
-
       removeNullNode(node);
 
-      cache.setLocal(local);
-
       // if not a root node
       if (node.getParentIdentifier() != null)
       {
@@ -856,6 +849,10 @@
     */
    protected void removeNullNode(ItemData item)
    {
+      // remove possible NullNodeData from cache
+      boolean local = cache.isLocal();
+      cache.setLocal(true);
+
       Fqn<String> fqn = makeNullItemFqn(item.getIdentifier());
       if ((NullNodeData)cache.get(fqn, ITEM_DATA) != null)
       {
@@ -869,6 +866,8 @@
       {
          cache.removeNode(fqn);
       }
+
+      cache.setLocal(local);
    }
 
    protected ItemData putNodeInBufferedCache(NodeData node, ModifyChildOption modifyListsOfChild)
@@ -900,15 +899,8 @@
     */
    protected PropertyData putProperty(PropertyData prop, ModifyChildOption modifyListsOfChild)
    {
-
-      // remove possible NullNodeData from cache
-      boolean local = cache.isLocal();
-      cache.setLocal(false);
-
       removeNullNode(prop);
 
-      cache.setLocal(local);
-
       // add in CHILD_PROPS
       cache.put(makeChildFqn(childProps, prop.getParentIdentifier(), prop.getQPath().getEntries()[prop.getQPath()
          .getEntries().length - 1]), ITEM_ID, prop.getIdentifier());



More information about the exo-jcr-commits mailing list