[exo-jcr-commits] exo-jcr SVN: r367 - in jcr/branches/1.12.0-JBC/component/core/src/main: resources/conf/portal and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Oct 26 07:10:54 EDT 2009


Author: areshetnyak
Date: 2009-10-26 07:10:54 -0400 (Mon, 26 Oct 2009)
New Revision: 367

Modified:
   jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/ExoJCRCacheLoader.java
   jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
   jcr/branches/1.12.0-JBC/component/core/src/main/resources/conf/portal/exojcr-jboss-cache-conf.xml
Log:
EXOJCR-201 : Add baching to JBossCacheStorageConnection

Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/ExoJCRCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/ExoJCRCacheLoader.java	2009-10-25 19:50:14 UTC (rev 366)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/ExoJCRCacheLoader.java	2009-10-26 11:10:54 UTC (rev 367)
@@ -19,6 +19,7 @@
 package org.exoplatform.services.jcr.impl.storage.jbosscache;
 
 import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection;
 import org.exoplatform.services.jcr.storage.WorkspaceDataContainer;
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
@@ -46,6 +47,8 @@
 
    private WorkspaceDataContainer dataContainer;
    
+   private JDBCStorageConnection jdbcConnection;
+   
    /**
     * Init the loader DataContainer with given WorkspaceDataContainer instance.
     *
@@ -137,7 +140,7 @@
     */
    public Object put(Fqn name, Object key, Object value) throws Exception
    {
-      // TODO Auto-generated method stub
+      dataContainer.
       return null;
    }
 

Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java	2009-10-25 19:50:14 UTC (rev 366)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java	2009-10-26 11:10:54 UTC (rev 367)
@@ -75,6 +75,9 @@
       this.cache = cache;
       this.itemsRoot = itemsRoot;
       this.treeRoot = treeRoot;
+      
+      // start batch
+      this.cache.startBatch();
    }
 
    private Fqn<String> makeNodeFqn(QPath nodePath)
@@ -278,8 +281,8 @@
     */
    public void rollback() throws IllegalStateException, RepositoryException
    {
-      // TODO Auto-generated method stub
-
+      // rollback batch
+      this.cache.endBatch(false);
    }
 
    /**
@@ -315,7 +318,8 @@
     */
    public void commit() throws IllegalStateException, RepositoryException
    {
-      // TODO Auto-generated method stub
+      // end batch
+      this.cache.endBatch(true);
    }
 
 }

Modified: jcr/branches/1.12.0-JBC/component/core/src/main/resources/conf/portal/exojcr-jboss-cache-conf.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/resources/conf/portal/exojcr-jboss-cache-conf.xml	2009-10-25 19:50:14 UTC (rev 366)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/resources/conf/portal/exojcr-jboss-cache-conf.xml	2009-10-26 11:10:54 UTC (rev 367)
@@ -80,4 +80,7 @@
             </properties>
 		</loader>
 	</loaders>
+   
+    <!-- Enable batching -->
+    <invocationBatching enabled="true"/>
 </jbosscache>



More information about the exo-jcr-commits mailing list