[exo-jcr-commits] exo-jcr SVN: r1412 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jan 15 09:32:02 EST 2010


Author: nzamosenchuk
Date: 2010-01-15 09:32:01 -0500 (Fri, 15 Jan 2010)
New Revision: 1412

Modified:
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
   jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
Log:
EXOJCR-391: Code update and cleanup.

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java	2010-01-15 14:30:29 UTC (rev 1411)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java	2010-01-15 14:32:01 UTC (rev 1412)
@@ -34,7 +34,6 @@
 import org.jgroups.Address;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -540,7 +539,8 @@
    }
 
    /**
-    * Gets object by key. If it is List<Object> adds new value to it.
+    * It tries to get Set by given key. If it is Set then adds new value and puts new set back.
+    * If null found, then new Set created (ordinary cache does).
     * 
     * @param fqn
     * @param key
@@ -557,7 +557,7 @@
    }
 
    /**
-    * Gets object by key. If it is List<Object> removes value from it.
+    * It tries to get set by given key. If it is set then removes value and puts new modified set back.
     * 
     * @param fqn
     * @param key
@@ -689,8 +689,8 @@
    }
 
    /**
-    * Put to list container.
-    * It tries to get list by given key. If it is list adds new value and puts list.
+    * It tries to get Set by given key. If it is Set then adds new value and puts new set back.
+    * If null found, then new Set created (ordinary cache does).
     */
    public static class AddToListContainer extends ChangesContainer
    {
@@ -727,15 +727,14 @@
          }
          else
          {
-            LOG.error("Unexpected value found by FQN:" + getFqn() + " and key:" + key + ". Expected list, found:"
+            LOG.error("Unexpected object found by FQN:" + getFqn() + " and key:" + key + ". Expected Set, but found:"
                + existingObject.getClass().getName());
          }
       }
    }
 
    /**
-    * Removes from list container.
-    * It tries to get list by given key. If it is list removes value and puts list.
+    * It tries to get set by given key. If it is set then removes value and puts new modified set back.
     */
    public static class RemoveFromListContainer extends ChangesContainer
    {

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-01-15 14:30:29 UTC (rev 1411)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java	2010-01-15 14:32:01 UTC (rev 1412)
@@ -48,7 +48,6 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
@@ -66,9 +65,9 @@
  * <li>cache consists of next resident nodes:
  *      <ul>
  *      <li>/$ITEMS - stores items by Id (i.e. /$ITEMS/itemId)</li>
- *      <li>/$CHILD_NODES, /$CHILD_PROPS - stores items by parentId and name (i.e. /$CHILD_NODES/parentId/childName/$ITEM_ID)</li>
- *      <li>/$CHILD_NODES_LIST, /$CHILD_PROPS_LIST - stores childs list by parentId and child Id 
- *      (i.e. /$CHILD_NODES_LIST/parentId/childId)</li>
+ *      <li>/$CHILD_NODES, /$CHILD_PROPS - stores items by parentId and name (i.e. /$CHILD_NODES/parentId/childName.$ITEM_ID)</li>
+ *      <li>/$CHILD_NODES_LIST, /$CHILD_PROPS_LIST - stores child list by parentId and child Id 
+ *      (i.e. /$CHILD_NODES_LIST/parentId.lists = serialized Set<Object>)</li>
  *      </ul>
  * </li>     
  * <li>all child properties/nodes lists should be evicted from parent at same time
@@ -114,14 +113,7 @@
    public static final String ITEM_ID = "$id".intern();
 
    public static final String ITEM_LIST = "$lists".intern();
-   
-   /**
-    * Empty cache node data for CHILD_x_LIST. 
-    */
-   public static final Map<Serializable, Object> NULL_DATA = Collections.emptyMap();
 
-   public static final Set<String> NO_CHILDS = Collections.emptySet();
-
    protected final BufferedJBossCache cache;
 
    protected final Fqn<String> itemsRoot;
@@ -173,7 +165,6 @@
          this.root = root;
 
          Fqn<String> parentFqn = makeChildListFqn(root, parentId);
-         // TODO replace getNode with get attr -> use ITEMS with CHILDS etc
          Node<Serializable, Object> parent = cache.getNode(parentFqn);
          if (parent != null)
          {
@@ -195,7 +186,7 @@
             T n = null;
             do
             {
-               String itemId = (String)cache.get(makeChildListFqn(root, parentId, (String)childs.next()), ITEM_ID);
+               String itemId = (String)cache.get(makeChildFqn(root, parentId, (String)childs.next()), ITEM_ID);
                if (itemId != null)
                {
                   n = (T)cache.get(makeItemFqn(itemId), ITEM_DATA);
@@ -235,7 +226,6 @@
 
    class ChildNodesIterator<N extends NodeData> extends ChildItemsIterator<N>
    {
-
       ChildNodesIterator(String parentId)
       {
          super(childNodes, parentId);
@@ -302,7 +292,7 @@
       this.cache = new BufferedJBossCache(factory.createCache(jbcConfig, false));
       if (transactionManager != null)
       {
-         cache.getConfiguration().getRuntimeConfig().setTransactionManager(transactionManager);         
+         cache.getConfiguration().getRuntimeConfig().setTransactionManager(transactionManager);
       }
 
       this.cache.create();
@@ -382,7 +372,6 @@
     */
    public void put(ItemData item)
    {
-      // TODO: Omit writing to list!
       if (item.isNode())
       {
          putNode((NodeData)item, ModifyChildOption.NOT_MODIFY);
@@ -433,11 +422,6 @@
          }
          else if (state.isRenamed())
          {
-            // TODO cleanup: update subtree paths
-            //                  if (prevState.isDeleted() && prevState.isNode())
-            //                  {
-            //                     renameNode((NodeData)prevState.getData(), (NodeData)state.getData());
-            //                  }
             putItem(state.getData());
          }
          else if (state.isMixinChanged())
@@ -448,10 +432,6 @@
                updateMixin((NodeData)state.getData());
             }
          }
-         else
-         {
-            // TODO warn it?
-         }
       }
    }
 
@@ -475,7 +455,6 @@
       {
          // cache fact of empty childs list
          cache.put(makeChildListFqn(childNodesList, parent.getIdentifier()), ITEM_LIST, new HashSet<Object>());
-         //cache.put(makeChildListFqn(childNodesList, parent.getIdentifier()), NULL_DATA);
       }
    }
 
@@ -506,17 +485,6 @@
    public void addChildPropertiesList(NodeData parent, List<PropertyData> childProperties)
    {
       // TODO not implemented, will force read from DB
-
-      //      start();
-      //      try
-      //      {
-      //         commit();
-      //      }
-      //      catch (Throwable e)
-      //      {
-      //         rollback();
-      //         LOG.error("addChildNodes error " + parent.getQPath().getAsString(), e);
-      //      }
    }
 
    /**
@@ -555,9 +523,9 @@
    public List<NodeData> getChildNodes(final NodeData parent)
    {
       final List<NodeData> childs = new ArrayList<NodeData>();
-      //final Node<Serializable, Object> parentNode =
-      //   cache.getNode(makeChildListFqn(childNodesList, parent.getIdentifier()));
-      final Set<Object> set = (Set<Object>)cache.get(makeChildListFqn(childNodesList, parent.getIdentifier()), ITEM_LIST);
+      // get list of children uuids
+      final Set<Object> set =
+         (Set<Object>)cache.get(makeChildListFqn(childNodesList, parent.getIdentifier()), ITEM_LIST);
       if (set != null)
       {
          for (Object child : set)
@@ -571,7 +539,7 @@
             childs.add(node);
          }
 
-         // order childs by orderNumber, as JBC returns childs in any order
+         // order children by orderNumber, as HashSet returns children in other order
          Collections.sort(childs, new NodesOrderComparator<NodeData>());
 
          return childs;
@@ -608,27 +576,24 @@
    protected List<PropertyData> getChildProps(String parentId, boolean withValue)
    {
       final List<PropertyData> childs = new ArrayList<PropertyData>();
-      //final Node<Serializable, Object> parentNode = cache.getNode(makeChildListFqn(childPropsList, parentId));
-      final Set<Object> list = (Set<Object>)cache.get(makeChildListFqn(childPropsList, parentId), ITEM_LIST);
-      if (list != null)
+      // get set of property uuids
+      final Set<Object> set = (Set<Object>)cache.get(makeChildListFqn(childPropsList, parentId), ITEM_LIST);
+      if (set != null)
       {
-         for (Object child : list)
+         for (Object child : set)
          {
             PropertyData node = (PropertyData)cache.get(makeItemFqn((String)child), ITEM_DATA);
             if (node == null)
             {
                return null;
             }
-
             if (withValue && node.getValues().size() <= 0)
             {
                // don't return list of empty-valued props (but listChildProperties() can)
                return null;
             }
-
             childs.add(node);
          }
-
          return childs;
       }
       else
@@ -642,7 +607,7 @@
     */
    public long getSize()
    {
-      // TODO 
+      // TODO, cache seems doesn't have a methods to calculate it's size
       return -1;
    }
 
@@ -651,11 +616,10 @@
     */
    public boolean isEnabled()
    {
-      // TODO
       return true;
    }
 
-   // ****************
+   // non-public members
 
    /**
     * Make Item absolute Fqn, i.e. /$ITEMS/itemID.
@@ -682,16 +646,16 @@
    }
 
    /**
-    * Make child absolute Fqn, i.e. /root/parentId/childId.
+    * Make child Item absolute Fqn, i.e. /root/parentId/childName.
     *
     * @param root Fqn
     * @param parentId String
-    * @param itemId String
+    * @param childName String
     * @return Fqn
     */
-   protected Fqn<String> makeChildListFqn(Fqn<String> root, String parentId, String childId)
+   protected Fqn<String> makeChildFqn(Fqn<String> root, String parentId, String childName)
    {
-      return Fqn.fromRelativeElements(root, parentId, childId);
+      return Fqn.fromRelativeElements(root, parentId, childName);
    }
 
    /**
@@ -732,33 +696,21 @@
     */
    protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild)
    {
+      // if not a root node
       if (node.getParentIdentifier() != null)
       {
-         // if not a root node
-
          // add in CHILD_NODES
          cache.put(makeChildFqn(childNodes, node.getParentIdentifier(), node.getQPath().getEntries()[node.getQPath()
             .getEntries().length - 1]), ITEM_ID, node.getIdentifier());
-
-         // add in CHILD_NODES_LIST
-         // TODO 
-         //         Node<Serializable, Object> childsParent =
-         //            cache.getNode(makeChildListFqn(childNodesList, node.getParentIdentifier()));
-         //         if (childsParent != null)
-         //         {
-         //            cache.put(makeChildListFqn(childNodesList, node.getParentIdentifier(), node.getIdentifier()), NULL_DATA);
-         //         }
-         if (modifyListsOfChild == ModifyChildOption.MODIFY || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
+         // if MODIFY and List present OR FORCE_MODIFY, then write
+         if ((modifyListsOfChild == ModifyChildOption.MODIFY && cache.getNode(makeChildListFqn(childNodesList, node
+            .getParentIdentifier())) != null)
+            || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
          {
-            if (cache.getNode(makeChildListFqn(childNodesList, node.getParentIdentifier())) != null
-               || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
-            {
-               //cache.put(makeChildListFqn(childNodesList, node.getParentIdentifier(), node.getIdentifier()), NULL_DATA);
-               cache.addToList(makeChildListFqn(childNodesList, node.getParentIdentifier()), ITEM_LIST, node.getIdentifier());
-            }
+            cache.addToList(makeChildListFqn(childNodesList, node.getParentIdentifier()), ITEM_LIST, node
+               .getIdentifier());
          }
       }
-
       // add in ITEMS
       return (ItemData)cache.put(makeItemFqn(node.getIdentifier()), ITEM_DATA, node);
    }
@@ -774,31 +726,13 @@
       // add in CHILD_PROPS
       cache.put(makeChildFqn(childProps, prop.getParentIdentifier(), prop.getQPath().getEntries()[prop.getQPath()
          .getEntries().length - 1]), ITEM_ID, prop.getIdentifier());
-
-      // add in CHILD_PROPS_LIST
-      // TODO
-      //      Node<Serializable, Object> childsParent =
-      //         cache.getNode(makeChildListFqn(childPropsList, prop.getParentIdentifier()));
-      //      if (childsParent != null)
-      //      {
-      //         cache.put(makeChildListFqn(childPropsList, prop.getParentIdentifier(), prop.getIdentifier()), NULL_DATA);
-      //      }
-      if (modifyListsOfChild == ModifyChildOption.MODIFY || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
+      // if MODIFY and List present OR FORCE_MODIFY, then write
+      if ((modifyListsOfChild == ModifyChildOption.MODIFY && cache.getNode(makeChildListFqn(childPropsList, prop
+         .getParentIdentifier())) != null)
+         || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
       {
-         if (cache.getNode(makeChildListFqn(childPropsList, prop.getParentIdentifier())) != null
-            || modifyListsOfChild == ModifyChildOption.FORCE_MODIFY)
-         {
-            //cache.put(makeChildListFqn(childPropsList, prop.getParentIdentifier(), prop.getIdentifier()), NULL_DATA);
-            cache.addToList(makeChildListFqn(childPropsList, prop.getParentIdentifier()), ITEM_LIST, prop.getIdentifier());
-         }
+         cache.addToList(makeChildListFqn(childPropsList, prop.getParentIdentifier()), ITEM_LIST, prop.getIdentifier());
       }
-
-      // TODO REFERENCEs hadnling
-      //if (prop.getType() == PropertyType.REFERENCE)
-      //{
-      //   addReferences(data);
-      //}
-
       // add in ITEMS
       return (PropertyData)cache.put(makeItemFqn(prop.getIdentifier()), ITEM_DATA, prop);
    }
@@ -816,8 +750,8 @@
                .getQPath().getEntries().length - 1]));
 
             // remove from CHILD_NODES_LIST of parent
-            //cache.removeNode(makeChildListFqn(childNodesList, item.getParentIdentifier(), item.getIdentifier()));
-            cache.removeFromList(makeChildListFqn(childNodesList, item.getParentIdentifier()), ITEM_LIST, item.getIdentifier());
+            cache.removeFromList(makeChildListFqn(childNodesList, item.getParentIdentifier()), ITEM_LIST, item
+               .getIdentifier());
 
             // remove from CHILD_NODES as parent
             cache.removeNode(makeChildListFqn(childNodes, item.getIdentifier()));
@@ -839,33 +773,13 @@
             .getQPath().getEntries().length - 1]));
 
          // remove from CHILD_PROPS_LIST
-         //cache.removeNode(makeChildListFqn(childPropsList, item.getParentIdentifier(), item.getIdentifier()));
-         cache.removeFromList(makeChildListFqn(childPropsList, item.getParentIdentifier()), ITEM_LIST, item.getIdentifier());
-
-         // TODO REFERENCEs hadnling
-         //if (prop.getType() == PropertyType.REFERENCE)
-         //{
-         //   addReferences(data);
-         //}
+         cache.removeFromList(makeChildListFqn(childPropsList, item.getParentIdentifier()), ITEM_LIST, item
+            .getIdentifier());
       }
-
       // remove from ITEMS
       cache.removeNode(makeItemFqn(item.getIdentifier()));
    }
 
-   @Deprecated
-   protected void renameNode(NodeData from, NodeData to)
-   {
-      // TODO do move more cache-friendly, i.e. change ACL & paths of whole cached sub-tree
-
-      // remove "from", whole subtree will be removed
-      removeItem(from);
-
-      // add "to" only root will be added
-      // moved subtree will be populated to the cache on read
-      putItem(to);
-   }
-
    /**
     * Update Node's mixin and ACL.
     *
@@ -932,19 +846,16 @@
       boolean inheritACL = acl != null;
 
       // update properties
-      // TODO for (Object child : cache.getChildrenNames(makeChildListFqn(childPropsList, parentId)))
       for (Iterator<PropertyData> iter = new ChildPropertiesIterator<PropertyData>(parentId); iter.hasNext();)
       {
          PropertyData prevProp = iter.next();
 
-         // TODO if ACL related set on this Node...  
          if (inheritACL
             && (prevProp.getQPath().getName().equals(Constants.EXO_PERMISSIONS) || prevProp.getQPath().getName()
                .equals(Constants.EXO_OWNER)))
          {
             inheritACL = false;
          }
-
          // recreate with new path for child Props only
          QPath newPath =
             QPath
@@ -956,11 +867,9 @@
       }
 
       // update child nodes
-      // TODO for (Object child : cache.getChildrenNames(makeChildListFqn(childNodesList, parentId)))
       for (Iterator<NodeData> iter = new ChildNodesIterator<NodeData>(parentId); iter.hasNext();)
       {
          NodeData prevNode = iter.next();
-
          // recreate with new path for child Nodes only
          QPath newPath =
             QPath
@@ -969,10 +878,8 @@
             new TransientNodeData(newPath, prevNode.getIdentifier(), prevNode.getPersistedVersion(), prevNode
                .getPrimaryTypeName(), prevNode.getMixinTypeNames(), prevNode.getOrderNumber(), prevNode
                .getParentIdentifier(), inheritACL ? acl : prevNode.getACL()); // TODO check ACL
-
          // update this node
          cache.put(makeItemFqn(newNode.getIdentifier()), ITEM_DATA, newNode);
-
          // update childs recursive
          updateTreePath(newNode.getIdentifier(), newNode.getQPath(), inheritACL ? acl : null);
       }
@@ -989,7 +896,6 @@
       for (Iterator<NodeData> iter = new ChildNodesIterator<NodeData>(parentId); iter.hasNext();)
       {
          NodeData prevNode = iter.next();
-
          // is ACL changes on this node (i.e. ACL inheritance brokes)
          for (InternalQName mixin : prevNode.getMixinTypeNames())
          {
@@ -998,16 +904,13 @@
                continue;
             }
          }
-
          // recreate with new path for child Nodes only
          TransientNodeData newNode =
             new TransientNodeData(prevNode.getQPath(), prevNode.getIdentifier(), prevNode.getPersistedVersion(),
                prevNode.getPrimaryTypeName(), prevNode.getMixinTypeNames(), prevNode.getOrderNumber(), prevNode
                   .getParentIdentifier(), acl);
-
          // update this node
          cache.put(makeItemFqn(newNode.getIdentifier()), ITEM_DATA, newNode);
-
          // update childs recursive
          updateChildsACL(newNode.getIdentifier(), acl);
       }
@@ -1016,19 +919,16 @@
    public void beginTransaction()
    {
       cache.beginTransaction();
-
    }
 
    public void commitTransaction()
    {
       cache.commitTransaction();
-
    }
 
    public void rollbackTransaction()
    {
       cache.rollbackTransaction();
-
    }
 
    /**

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java	2010-01-15 14:30:29 UTC (rev 1411)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java	2010-01-15 14:32:01 UTC (rev 1412)
@@ -17,6 +17,8 @@
 package org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
 
 import java.io.Serializable;
+import java.util.Collections;
+import java.util.Map;
 
 import org.exoplatform.services.cache.CacheListenerContext;
 import org.exoplatform.services.jcr.JcrImplBaseTest;
@@ -58,6 +60,8 @@
    
    protected String jbcConfig;
    
+   public static final Map<Serializable, Object> NULL_DATA = Collections.emptyMap();
+   
    public void setUp() throws Exception
    {
       super.setUp();
@@ -114,16 +118,16 @@
       cache.put(Fqn.fromRelativeElements(itemsRoot, evictionPropData.getIdentifier()), JBossCacheWorkspaceStorageCache.ITEM_DATA, evictionPropData);
       
       // put to CHILD_NODES_LIST
-      cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), evictionNodeData.getIdentifier()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+      cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), evictionNodeData.getIdentifier()), NULL_DATA);
       
       for (int i = 0 ; i < 10; i++)
-         cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), IdGenerator.generate()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+         cache.put(Fqn.fromRelativeElements(childNodesList, evictionNodeData.getParentIdentifier(), IdGenerator.generate()), NULL_DATA);
       
       // put to CHILD_PROPS_LIST
-      cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), evictionPropData.getIdentifier()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+      cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), evictionPropData.getIdentifier()), NULL_DATA);
       
       for (int i = 0 ; i < 10; i++)
-         cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), IdGenerator.generate()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+         cache.put(Fqn.fromRelativeElements(childPropsList, evictionPropData.getParentIdentifier(), IdGenerator.generate()), NULL_DATA);
       
       
       // check for exists
@@ -171,10 +175,10 @@
       String parentId = IdGenerator.generate();
       
       // put to CHILD_PROPS_LIST
-      cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+      cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), NULL_DATA);
       
       for (int i = 0 ; i < 10; i++)
-         cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), JBossCacheWorkspaceStorageCache.NULL_DATA);
+         cache.put(Fqn.fromRelativeElements(childPropsList, parentId, IdGenerator.generate()), NULL_DATA);
       
       
       assertEquals( 11, cache.getChildrenNames(Fqn.fromRelativeElements(childPropsList, parentId)).size());

Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml	2010-01-15 14:30:29 UTC (rev 1411)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml	2010-01-15 14:32:01 UTC (rev 1412)
@@ -11,7 +11,7 @@
 
    <!-- Eviction configuration -->
    <eviction wakeUpInterval="5000">
-      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
+      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="100000">
          <property name="maxNodes" value="5000" />
          <property name="timeToLive" value="120000" />
       </default>



More information about the exo-jcr-commits mailing list