[exo-jcr-commits] exo-jcr SVN: r1535 - in jcr/trunk/exo.jcr.component.core/src: test/resources/conf/cluster and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jan 21 15:14:08 EST 2010


Author: nfilotto
Date: 2010-01-21 15:14:07 -0500 (Thu, 21 Jan 2010)
New Revision: 1535

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
   jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml
   jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
   jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml
   jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml
Log:
EXOJCR-424: Ensure that all the actions that not support transaction, will be executed outside a transaction and add preload in the config file

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java	2010-01-21 17:20:23 UTC (rev 1534)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java	2010-01-21 20:14:07 UTC (rev 1535)
@@ -72,6 +72,7 @@
 
 import javax.jcr.RepositoryException;
 import javax.jcr.lock.LockException;
+import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
 /**
@@ -157,6 +158,11 @@
     */
    private LockRemover lockRemover;
 
+   /**
+    * The current Transaction Manager
+    */
+   private TransactionManager tm;
+   
    private Cache<Serializable, Object> cache;
 
    private final Fqn<String> lockRoot;
@@ -249,6 +255,7 @@
 
          cache = factory.createCache(pathToConfig, false);
 
+         this.tm = transactionManager;
          if (transactionManager != null)
          {
             cache.getConfiguration().getRuntimeConfig().setTransactionManager(transactionManager);
@@ -309,11 +316,27 @@
       return lData;
    }
 
+   private final LockActionNonTxAware<Integer, Object> getNumLocks = new LockActionNonTxAware<Integer, Object>()
+   {
+      public Integer execute(Object arg)
+      {
+         return cache.getChildrenNames(lockRoot).size();
+      }
+   };
+   
    @Managed
    @ManagedDescription("The number of active locks")
    public int getNumLocks()
    {
-      return cache.getChildrenNames(lockRoot).size();
+      try
+      {
+         return executeLockActionNonTxAware(getNumLocks, null);
+      }
+      catch (LockException e)
+      {
+         // ignore me will never occur
+      }
+      return -1;
    }
 
    /**
@@ -326,6 +349,19 @@
       return sessionManager;
    }
 
+   private final LockActionNonTxAware<Boolean, String> isLockLive = new LockActionNonTxAware<Boolean, String>()
+   {
+      public Boolean execute(String nodeId)
+      {
+         if (pendingLocks.containsKey(nodeId) || cache.getRoot().hasChild(makeLockFqn(nodeId)))
+         {
+            return true;
+         }
+
+         return false;
+      }  
+   };
+   
    /**
     * Check is LockManager contains lock. No matter it is in pending or persistent state.
     * 
@@ -334,11 +370,14 @@
     */
    public boolean isLockLive(String nodeId)
    {
-      if (pendingLocks.containsKey(nodeId) || cache.getRoot().hasChild(makeLockFqn(nodeId)))
+      try
       {
-         return true;
+         return executeLockActionNonTxAware(isLockLive, nodeId);
       }
-
+      catch (LockException e)
+      {
+         // ignore me will never occur
+      }  
       return false;
    }
 
@@ -521,31 +560,40 @@
       }
    }
 
-   /**
-    * Refreshed lock data in cache
-    * 
-    * @param newLockData
-    */
-   public void refresh(LockData newLockData) throws LockException
+   private final LockActionNonTxAware<Object, LockData> refresh = new LockActionNonTxAware<Object, LockData>()
    {
-      //first look pending locks
-      if (pendingLocks.containsKey(newLockData.getNodeIdentifier()))
+      public Object execute(LockData newLockData) throws LockException
       {
-         pendingLocks.put(newLockData.getNodeIdentifier(), newLockData);
-      }
-      else
-      {
-         Fqn<String> fqn = makeLockFqn(newLockData.getNodeIdentifier());
-         if (cache.getRoot().hasChild(fqn))
+         //first look pending locks
+         if (pendingLocks.containsKey(newLockData.getNodeIdentifier()))
          {
-            cache.getRoot().addChild(fqn);
+            pendingLocks.put(newLockData.getNodeIdentifier(), newLockData);
          }
          else
          {
-            throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
-               + " since lock is not exist");
+            Fqn<String> fqn = makeLockFqn(newLockData.getNodeIdentifier());
+            if (cache.getRoot().hasChild(fqn))
+            {
+               cache.getRoot().addChild(fqn);
+            }
+            else
+            {
+               throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
+                  + " since lock is not exist");
+            }
          }
+         return null;
       }
+   };
+   
+   /**
+    * Refreshed lock data in cache
+    * 
+    * @param newLockData
+    */
+   public void refresh(LockData newLockData) throws LockException
+   {
+      executeLockActionNonTxAware(refresh, newLockData);
    }
 
    /**
@@ -674,9 +722,25 @@
       }
    }
 
+   private final LockActionNonTxAware<Boolean, String> lockExist = new LockActionNonTxAware<Boolean, String>()
+   {
+      public Boolean execute(String nodeId) throws LockException
+      {
+         return cache.getRoot().hasChild(makeLockFqn(nodeId));
+      }
+   };
+   
    private boolean lockExist(String nodeId)
    {
-      return cache.getRoot().hasChild(makeLockFqn(nodeId));
+      try
+      {
+         return executeLockActionNonTxAware(lockExist, nodeId);
+      }
+      catch (LockException e)
+      {
+         // ignore me will never occur
+      }
+      return false;
    }
 
    /**
@@ -763,25 +827,57 @@
       return retval;
    }
 
+   private final LockActionNonTxAware<LockData, String> getLockDataById = new LockActionNonTxAware<LockData, String>()
+   {
+      public LockData execute(String nodeId) throws LockException
+      {
+         return (LockData)cache.get(makeLockFqn(nodeId), LOCK_DATA);
+      }
+   };
+   
    protected LockData getLockDataById(String nodeId)
    {
-      return (LockData)cache.get(makeLockFqn(nodeId), LOCK_DATA);
+      try
+      {
+         return executeLockActionNonTxAware(getLockDataById, nodeId);
+      }
+      catch (LockException e)
+      {
+         // ignore me will never occur
+      }
+      return null;
    }
 
-   protected synchronized List<LockData> getLockList()
+   private final LockActionNonTxAware<List<LockData>, Object> getLockList = new LockActionNonTxAware<List<LockData>, Object>()
    {
-      Set<Object> nodesId = cache.getChildrenNames(lockRoot);
+      public List<LockData> execute(Object arg) throws LockException
+      {
+         Set<Object> nodesId = cache.getChildrenNames(lockRoot);
 
-      List<LockData> locksData = new ArrayList<LockData>();
-      for (Object nodeId : nodesId)
-      {
-         LockData lockData = (LockData)cache.get(makeLockFqn((String)nodeId), LOCK_DATA);;
-         if (lockData != null)
+         List<LockData> locksData = new ArrayList<LockData>();
+         for (Object nodeId : nodesId)
          {
-            locksData.add(lockData);
+            LockData lockData = (LockData)cache.get(makeLockFqn((String)nodeId), LOCK_DATA);
+            if (lockData != null)
+            {
+               locksData.add(lockData);
+            }
          }
+         return locksData;
       }
-      return locksData;
+   };
+   
+   protected synchronized List<LockData> getLockList()
+   {
+      try
+      {
+         return executeLockActionNonTxAware(getLockList, null);
+      }
+      catch (LockException e)
+      {
+         // ignore me will never occur
+      }
+      return null;
    }
 
    /**
@@ -885,4 +981,55 @@
       }
       node.setResident(true);
    }
+   
+   /**
+    * Execute the given action outside a transaction
+    * @throws LockException 
+    */
+   private <R, A> R executeLockActionNonTxAware(LockActionNonTxAware<R, A> action, A arg) throws LockException
+   {
+      Transaction tx = null;
+      try
+      {
+         if (tm != null)
+         {
+            try
+            {
+               tx = tm.suspend();
+            }
+            catch (Exception e)
+            {
+               log.warn("Cannot suspend the current transaction", e);
+            }
+         }
+         return action.execute(arg);
+      }
+      finally
+      {
+         if (tx != null)
+         {
+            try
+            {
+               tm.resume(tx);
+            }
+            catch (Exception e)
+            {
+               log.warn("Cannot resume the current transaction", e);
+            }
+         }
+      }       
+   }
+   
+   /**
+    * Actions that are not supposed to be called within a transaction
+    * 
+    * Created by The eXo Platform SAS
+    * Author : Nicolas Filotto 
+    *          nicolas.filotto at exoplatform.com
+    * 21 janv. 2010
+    */
+   private static interface LockActionNonTxAware<R, A>
+   {
+      R execute(A arg) throws LockException;
+   }
 }

Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml	2010-01-21 17:20:23 UTC (rev 1534)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml	2010-01-21 20:14:07 UTC (rev 1535)
@@ -1,68 +1,57 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
 
-   <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
-   
-   <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_db1_ws">
-      <stateRetrieval timeout="20000" fetchInMemoryState="false"  nonBlocking="true"/>
-      <jgroupsConfig >
+	<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
 
-         <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true"
-            recv_buf_size="20000000" send_buf_size="640000"
-            discard_incompatible_packets="true" max_bundle_size="64000"
-            max_bundle_timeout="30" use_incoming_packet_handler="true"
-            enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
-            skip_suspected_members="true" use_concurrent_stack="true"
-            thread_pool.enabled="true" thread_pool.min_threads="1"
-            thread_pool.max_threads="25" thread_pool.keep_alive_time="5000"
-            thread_pool.queue_enabled="false" thread_pool.queue_max_size="100"
-            thread_pool.rejection_policy="run" oob_thread_pool.enabled="true"
-            oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8"
-            oob_thread_pool.keep_alive_time="5000"
-            oob_thread_pool.queue_enabled="false"
-            oob_thread_pool.queue_max_size="100"
-            oob_thread_pool.rejection_policy="run" />
-         <MPING timeout="2000" num_initial_members="2" mcast_port="34540"
-            bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+	<clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_db1_ws">
+		<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
+		<jgroupsConfig>
 
+			<TCP bind_addr="127.0.0.1" start_port="9800" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
+				max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
+				skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+				thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+				oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+				oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+			<MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
 
-         <MERGE2 max_interval="30000" min_interval="10000" />
-         <FD_SOCK />
-         <FD max_tries="5" shun="true" timeout="10000" />
-         <VERIFY_SUSPECT timeout="1500" />
-         <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0"
-            retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
-         <UNICAST timeout="300,600,1200,2400,3600" />
-         <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000"
-            stability_delay="1000" />
-         <pbcast.GMS join_timeout="5000" print_local_addr="true"
-            shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
-         <FRAG2 frag_size="60000" />
-         <pbcast.STREAMING_STATE_TRANSFER />
-         <pbcast.FLUSH timeout="0" />
 
-      </jgroupsConfig>
+			<MERGE2 max_interval="30000" min_interval="10000" />
+			<FD_SOCK />
+			<FD max_tries="5" shun="true" timeout="10000" />
+			<VERIFY_SUSPECT timeout="1500" />
+			<pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
+			<UNICAST timeout="300,600,1200,2400,3600" />
+			<pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
+			<pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
+			<FRAG2 frag_size="60000" />
+			<pbcast.STREAMING_STATE_TRANSFER />
+			<pbcast.FLUSH timeout="0" />
 
-      <sync />
-   </clustering>
-   
-   <loaders passivation="false" shared="true">
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
-              ignoreModifications="false" purgeOnStartup="false">
-         <properties>
-            cache.jdbc.table.name=jcrlocks_db1_ws
-            cache.jdbc.table.create=true
-            cache.jdbc.table.drop=false
-            cache.jdbc.table.primarykey=jcrlocks_db1_ws_pk
-            cache.jdbc.fqn.column=fqn
-            cache.jdbc.fqn.type=VARCHAR(512)
-            cache.jdbc.node.column=node
-            cache.jdbc.node.type=LONGBLOB
-            cache.jdbc.parent.column=parent
-            cache.jdbc.datasource=jdbcjcr
+		</jgroupsConfig>
+
+		<sync />
+	</clustering>
+
+	<loaders passivation="false" shared="true">
+		<preload>
+			<node fqn="/" />
+		</preload>
+		<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+			<properties>
+				cache.jdbc.table.name=jcrlocks_db1_ws
+				cache.jdbc.table.create=true
+				cache.jdbc.table.drop=false
+				cache.jdbc.table.primarykey=jcrlocks_db1_ws_pk
+				cache.jdbc.fqn.column=fqn
+				cache.jdbc.fqn.type=VARCHAR(512)
+				cache.jdbc.node.column=node
+				cache.jdbc.node.type=LONGBLOB
+				cache.jdbc.parent.column=parent
+				cache.jdbc.datasource=jdbcjcr
           </properties>
-      </loader>  
-      
-   </loaders>
-   
+		</loader>
+
+	</loaders>
+
 </jbosscache>

Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml	2010-01-21 17:20:23 UTC (rev 1534)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml	2010-01-21 20:14:07 UTC (rev 1535)
@@ -1,68 +1,57 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
 
-   <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
-   
-   <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_db1_ws1">
-      <stateRetrieval timeout="20000" fetchInMemoryState="false"  nonBlocking="true"/>
-      <jgroupsConfig>
+	<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
 
-         <TCP bind_addr="127.0.0.1" start_port="9850" loopback="true"
-            recv_buf_size="20000000" send_buf_size="640000"
-            discard_incompatible_packets="true" max_bundle_size="64000"
-            max_bundle_timeout="30" use_incoming_packet_handler="true"
-            enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
-            skip_suspected_members="true" use_concurrent_stack="true"
-            thread_pool.enabled="true" thread_pool.min_threads="1"
-            thread_pool.max_threads="25" thread_pool.keep_alive_time="5000"
-            thread_pool.queue_enabled="false" thread_pool.queue_max_size="100"
-            thread_pool.rejection_policy="run" oob_thread_pool.enabled="true"
-            oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8"
-            oob_thread_pool.keep_alive_time="5000"
-            oob_thread_pool.queue_enabled="false"
-            oob_thread_pool.queue_max_size="100"
-            oob_thread_pool.rejection_policy="run" />
-         <MPING timeout="2000" num_initial_members="2" mcast_port="34542"
-            bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+	<clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_db1_ws1">
+		<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
+		<jgroupsConfig>
 
+			<TCP bind_addr="127.0.0.1" start_port="9850" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
+				max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
+				skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+				thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+				oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+				oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+			<MPING timeout="2000" num_initial_members="2" mcast_port="34542" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
 
-         <MERGE2 max_interval="30000" min_interval="10000" />
-         <FD_SOCK />
-         <FD max_tries="5" shun="true" timeout="10000" />
-         <VERIFY_SUSPECT timeout="1500" />
-         <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0"
-            retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
-         <UNICAST timeout="300,600,1200,2400,3600" />
-         <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000"
-            stability_delay="1000" />
-         <pbcast.GMS join_timeout="5000" print_local_addr="true"
-            shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
-         <FRAG2 frag_size="60000" />
-         <pbcast.STREAMING_STATE_TRANSFER />
-         <pbcast.FLUSH timeout="0" />
 
-      </jgroupsConfig>
+			<MERGE2 max_interval="30000" min_interval="10000" />
+			<FD_SOCK />
+			<FD max_tries="5" shun="true" timeout="10000" />
+			<VERIFY_SUSPECT timeout="1500" />
+			<pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
+			<UNICAST timeout="300,600,1200,2400,3600" />
+			<pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
+			<pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
+			<FRAG2 frag_size="60000" />
+			<pbcast.STREAMING_STATE_TRANSFER />
+			<pbcast.FLUSH timeout="0" />
 
-      <sync />
-   </clustering>
-   
-   <loaders passivation="false" shared="true">
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
-              ignoreModifications="false" purgeOnStartup="false">
-         <properties>
-            cache.jdbc.table.name=jcrlocks_db1_ws1
-            cache.jdbc.table.create=true
-            cache.jdbc.table.drop=false
-            cache.jdbc.table.primarykey=jcrlocks_db1_ws1_pk
-            cache.jdbc.fqn.column=fqn
-            cache.jdbc.fqn.type=VARCHAR(512)
-            cache.jdbc.node.column=node
-            cache.jdbc.node.type=LONGBLOB
-            cache.jdbc.parent.column=parent
-            cache.jdbc.datasource=jdbcjcr
+		</jgroupsConfig>
+
+		<sync />
+	</clustering>
+
+	<loaders passivation="false" shared="true">
+		<preload>
+			<node fqn="/" />
+		</preload>
+		<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+			<properties>
+				cache.jdbc.table.name=jcrlocks_db1_ws1
+				cache.jdbc.table.create=true
+				cache.jdbc.table.drop=false
+				cache.jdbc.table.primarykey=jcrlocks_db1_ws1_pk
+				cache.jdbc.fqn.column=fqn
+				cache.jdbc.fqn.type=VARCHAR(512)
+				cache.jdbc.node.column=node
+				cache.jdbc.node.type=LONGBLOB
+				cache.jdbc.parent.column=parent
+				cache.jdbc.datasource=jdbcjcr
           </properties>
-      </loader>  
-      
-   </loaders>
-   
+		</loader>
+
+	</loaders>
+
 </jbosscache>

Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml	2010-01-21 17:20:23 UTC (rev 1534)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml	2010-01-21 20:14:07 UTC (rev 1535)
@@ -1,26 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
 
-   <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
-   
-   <loaders passivation="false" shared="true">
-        
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
-              ignoreModifications="false" purgeOnStartup="false">
-         <properties>
-            cache.jdbc.table.name=jdbcjcr_db1_ws
-            cache.jdbc.table.create=true
-            cache.jdbc.table.drop=false
-            cache.jdbc.table.primarykey=exojcr_pk
-            cache.jdbc.fqn.column=fqn
-            cache.jdbc.fqn.type=VARCHAR(512)
-            cache.jdbc.node.column=node
-            cache.jdbc.node.type=OBJECT
-            cache.jdbc.parent.column=parent
-            cache.jdbc.datasource=jdbcjcr
+	<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
+
+	<loaders passivation="false" shared="true">
+		<preload>
+			<node fqn="/" />
+		</preload>
+		<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+			<properties>
+				cache.jdbc.table.name=jdbcjcr_db1_ws
+				cache.jdbc.table.create=true
+				cache.jdbc.table.drop=false
+				cache.jdbc.table.primarykey=exojcr_pk
+				cache.jdbc.fqn.column=fqn
+				cache.jdbc.fqn.type=VARCHAR(512)
+				cache.jdbc.node.column=node
+				cache.jdbc.node.type=OBJECT
+				cache.jdbc.parent.column=parent
+				cache.jdbc.datasource=jdbcjcr
           </properties>
-      </loader>  
-      
-   </loaders>
-   
+		</loader>
+
+	</loaders>
+
 </jbosscache>

Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml	2010-01-21 17:20:23 UTC (rev 1534)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml	2010-01-21 20:14:07 UTC (rev 1535)
@@ -1,26 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
 
-   <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
-      
-   <loaders passivation="false" shared="true">  
-   
-      <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
-              ignoreModifications="false" purgeOnStartup="false">
-         <properties>
-            cache.jdbc.table.name=jdbcjcr_db1_ws1
-            cache.jdbc.table.create=true
-            cache.jdbc.table.drop=false
-            cache.jdbc.table.primarykey=exojcr_pk
-            cache.jdbc.fqn.column=fqn
-            cache.jdbc.fqn.type=VARCHAR(512)
-            cache.jdbc.node.column=node
-            cache.jdbc.node.type=OBJECT
-            cache.jdbc.parent.column=parent
-            cache.jdbc.datasource=jdbcjcr
+	<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
+
+	<loaders passivation="false" shared="true">
+		<preload>
+			<node fqn="/" />
+		</preload>
+		<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+			<properties>
+				cache.jdbc.table.name=jdbcjcr_db1_ws1
+				cache.jdbc.table.create=true
+				cache.jdbc.table.drop=false
+				cache.jdbc.table.primarykey=exojcr_pk
+				cache.jdbc.fqn.column=fqn
+				cache.jdbc.fqn.type=VARCHAR(512)
+				cache.jdbc.node.column=node
+				cache.jdbc.node.type=OBJECT
+				cache.jdbc.parent.column=parent
+				cache.jdbc.datasource=jdbcjcr
           </properties>
-      </loader>  
-      
-   </loaders>
-   
+		</loader>
+	</loaders>
 </jbosscache>



More information about the exo-jcr-commits mailing list