[exo-jcr-commits] exo-jcr SVN: r5414 - in jcr/branches/1.15.x: applications/product-patches/as/jboss/bin and 26 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 3 09:33:39 EST 2012


Author: tolusha
Date: 2012-01-03 09:33:36 -0500 (Tue, 03 Jan 2012)
New Revision: 5414

Added:
   jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jbosscache-lock.xml
   jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jbosscache-lock.xml
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jbosscache-lock.xml
   jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jbosscache-lock.xml
Removed:
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockPersisterEntry.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/FileSystemLockPersister.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockPersister.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
   jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/lock/
Modified:
   jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf
   jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat
   jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-configuration.xml
   jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt
   jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-configuration.xml
   jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt
   jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat
   jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas
   jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-configuration.xml
   jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt
   jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat
   jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh
   jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-configuration.xml
   jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt
   jcr/branches/1.15.x/exo.jcr.component.core/developer-notes.txt
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/binding.xml
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/configuration.xml
   jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestRepositoryManagement.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockImpl.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ProxyWorkspaceDataReceiver.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java
   jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config-backup.xml
   jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config.xml
   jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml
   jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml
   jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
   jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
   jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
   jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
   jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml
Log:
EXOJCR-1702: Removed old LockManager and old-style LockManager configuration support

Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf	2012-01-03 14:33:36 UTC (rev 5414)
@@ -53,6 +53,6 @@
 
 # Add the eXo variables
 JAVA_OPTS="$JAVA_OPTS -Dexo.profiles=$1 -Dexo.jcr.parent.dir=../server/default/data"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
+if [ "$1" = "ispn" ]; then
     shift
 fi
\ No newline at end of file

Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat	2012-01-03 14:33:36 UTC (rev 5414)
@@ -57,7 +57,6 @@
 rem # Add the eXo variables
 set "JAVA_OPTS=%JAVA_OPTS% -Dexo.profiles=%1 -Dexo.jcr.parent.dir=../server/default/data"
 
-if ""%1"" == ""jbc"" shift
 if ""%1"" == ""ispn"" shift
 
 :JAVA_OPTS_SET

Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-configuration.xml
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-configuration.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-configuration.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -58,18 +58,13 @@
          <value-param>
             <name>conf-path</name>
             <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-config.xml</value>
+            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
          </value-param>
          <value-param profiles="ispn">
             <name>conf-path</name>
             <description>JCR configuration file</description>
             <value>jar:/conf/portal/exo-jcr-ispn-config.xml</value>
          </value-param>
-         <value-param profiles="jbc">
-            <name>conf-path</name>
-            <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
-         </value-param>
       </init-params>
    </component>
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt	2012-01-03 14:33:36 UTC (rev 5414)
@@ -4,12 +4,10 @@
 
 In Unix environment
 
-* "./run.sh" to launch eXo JCR with the default configuration
+* "./run.sh" to launch eXo JCR with the configuration for JBoss Cache
 * "./run.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./run.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
 
 In Windows environment
 
-* "run.bat" to launch eXo JCR with the default configuration
+* "run.bat" to launch eXo JCR with the configuration for JBoss Cache
 * "run.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "run.bat jbc" to launch eXo JCR with the configuration for JBoss Cache

Modified: jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-configuration.xml
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-configuration.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-configuration.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -58,18 +58,13 @@
          <value-param>
             <name>conf-path</name>
             <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-config.xml</value>
+            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
          </value-param>
          <value-param profiles="ispn">
             <name>conf-path</name>
             <description>JCR configuration file</description>
             <value>jar:/conf/portal/exo-jcr-ispn-config.xml</value>
          </value-param>
-         <value-param profiles="jbc">
-            <name>conf-path</name>
-            <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
-         </value-param>
       </init-params>
    </component>
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,15 +1,13 @@
 Thank you for your interest in eXo JCR
 
-To launch it, execute the following command:
+To launch it, go to the bin directory and execute the following command:
 
 In Unix environment
 
-* "./eXo.sh" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "./run.sh" to launch eXo JCR with the configuration for JBoss Cache
+* "./run.sh ispn" to launch eXo JCR with the configuration for Infinispan
 
 In Windows environment
 
-* "eXo.bat" to launch eXo JCR with the default configuration
-* "eXo.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "run.bat" to launch eXo JCR with the configuration for JBoss Cache
+* "run.bat ispn" to launch eXo JCR with the configuration for Infinispan

Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat	2012-01-03 14:33:36 UTC (rev 5414)
@@ -82,7 +82,6 @@
 cd %JONAS_ROOT%/bin
 set JONAS_OPTS=%JONAS_OPTS% -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=%1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=../..
 set JAVA_OPTS=%JAVA_OPTS% -Xmx512M
-if ""%1"" == ""jbc"" shift
 if ""%1"" == ""ispn"" shift
 
 Rem ------------------------ End eXo configuration -----------------------------

Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas	2012-01-03 14:33:36 UTC (rev 5414)
@@ -81,7 +81,7 @@
 cd $JONAS_ROOT/bin
 JONAS_OPTS="$JONAS_OPTS -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=$1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=.."
 JAVA_OPTS="$JAVA_OPTS -Xmx512M"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
+if [ "$1" = "ispn" ]; then
     shift
 fi
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-configuration.xml
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-configuration.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-configuration.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -58,18 +58,13 @@
          <value-param>
             <name>conf-path</name>
             <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-config.xml</value>
+            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
          </value-param>
          <value-param profiles="ispn">
             <name>conf-path</name>
             <description>JCR configuration file</description>
             <value>jar:/conf/portal/exo-jcr-ispn-config.xml</value>
          </value-param>
-         <value-param profiles="jbc">
-            <name>conf-path</name>
-            <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
-         </value-param>
       </init-params>
    </component>
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt	2012-01-03 14:33:36 UTC (rev 5414)
@@ -2,12 +2,10 @@
 
 In Unix environment, go in the directory bin/unix then execute the following command:
 
-* "./jonas start" to launch eXo JCR with the default configuration
+* "./jonas start" to launch eXo JCR with the configuration for JBoss Cache
 * "./jonas ispn start" to launch eXo JCR with the configuration for Infinispan
-* "./jonas jbc start" to launch eXo JCR with the configuration for JBoss Cache
 
 In Windows environment, go in the directory bin\nt then execute the following command:
 
-* "jonas.bat start" to launch eXo JCR with the default configuration
+* "jonas.bat start" to launch eXo JCR with the configuration for JBoss Cache
 * "jonas.bat ispn start" to launch eXo JCR with the configuration for Infinispan
-* "jonas.bat jbc start" to launch eXo JCR with the configuration for JBoss Cache

Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat	2012-01-03 14:33:36 UTC (rev 5414)
@@ -10,7 +10,6 @@
 set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
 set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=%1 -Djava.net.preferIPv4Stack=true
 set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
-if ""%1"" == ""jbc"" shift
 if ""%1"" == ""ispn"" shift
 
 rem Launches the server

Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh	2012-01-03 14:33:36 UTC (rev 5414)
@@ -6,7 +6,7 @@
 LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
 SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
 EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=$1 -Djava.net.preferIPv4Stack=true"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
+if [ "$1" = "ispn" ]; then
     shift
 fi
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-configuration.xml
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-configuration.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-configuration.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -58,18 +58,13 @@
          <value-param>
             <name>conf-path</name>
             <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-config.xml</value>
+            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
          </value-param>
          <value-param profiles="ispn">
             <name>conf-path</name>
             <description>JCR configuration file</description>
             <value>jar:/conf/portal/exo-jcr-ispn-config.xml</value>
          </value-param>
-         <value-param profiles="jbc">
-            <name>conf-path</name>
-            <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-jbc-config.xml</value>
-         </value-param>
       </init-params>
    </component>
 

Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt	2012-01-03 14:33:36 UTC (rev 5414)
@@ -4,12 +4,10 @@
 
 In Unix environment
 
-* "./eXo.sh run" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn run" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "./run.sh" to launch eXo JCR with the configuration for JBoss Cache
+* "./run.sh ispn" to launch eXo JCR with the configuration for Infinispan
 
 In Windows environment
 
-* "eXo.bat run" to launch eXo JCR with the default configuration
-* "eXo.bat ispn run" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "run.bat" to launch eXo JCR with the configuration for JBoss Cache
+* "run.bat ispn" to launch eXo JCR with the configuration for Infinispan

Modified: jcr/branches/1.15.x/exo.jcr.component.core/developer-notes.txt
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/developer-notes.txt	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/developer-notes.txt	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,4 +1,5 @@
 * Removed JCR_SCONTAINER table
 * Removed StorageUpdateManager class
 * "update-storage" parameter in Workspace data container configuration is not supported anymore
-* Removed support of FileSystemLockPersister
\ No newline at end of file
+* Removed LockPersister
+* Removed LockManagerImpl which was the default lock manager 
\ No newline at end of file

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockManagerEntry.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -24,29 +24,4 @@
  */
 public class LockManagerEntry extends MappedParametrizedObjectEntry
 {
-
-   private long timeout = -1;
-
-   private LockPersisterEntry persister;
-
-   public long getTimeout()
-   {
-      return timeout;
-   }
-
-   public void setTimeout(long timeout)
-   {
-      this.timeout = timeout;
-   }
-
-   public LockPersisterEntry getPersister()
-   {
-      return persister;
-   }
-
-   public void setPersister(LockPersisterEntry persister)
-   {
-      this.persister = persister;
-   }
-
 }

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockPersisterEntry.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockPersisterEntry.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/LockPersisterEntry.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.config;
-
-/**
- * @author <a href="mailto:Sergey.Kabashnyuk at gmail.com">Sergey Kabashnyuk</a>
- * @version $Id: LockPersisterEntry.java 13891 2008-05-05 16:02:30Z pnedonosko $
- */
-public class LockPersisterEntry extends MappedParametrizedObjectEntry
-{
-
-}

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -44,7 +44,6 @@
 import org.exoplatform.services.jcr.impl.core.SessionRegistry;
 import org.exoplatform.services.jcr.impl.core.WorkspaceInitializer;
 import org.exoplatform.services.jcr.impl.core.access.DefaultAccessManagerImpl;
-import org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;
 import org.exoplatform.services.jcr.impl.core.lock.LockRemoverHolder;
 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeDataManagerImpl;
 import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeManagerImpl;
@@ -302,6 +301,7 @@
                   throw new RepositoryConfigurationException("Class not found for workspace data container "
                      + wsConfig.getUniqueName() + " : " + e);
                }
+
                // cache type
                try
                {
@@ -324,22 +324,6 @@
                workspaceContainer.registerComponentImplementation(LocalWorkspaceDataManagerStub.class);
                workspaceContainer.registerComponentImplementation(ObservationManagerRegistry.class);
 
-               // Lock manager and Lock persister is a optional parameters
-               if (wsConfig.getLockManager() != null && wsConfig.getLockManager().getPersister() != null)
-               {
-                  try
-                  {
-                     final Class<?> lockPersister = Class.forName(wsConfig.getLockManager().getPersister().getType());
-                     workspaceContainer.registerComponentImplementation(lockPersister);
-                  }
-                  catch (ClassNotFoundException e)
-                  {
-                     throw new RepositoryConfigurationException("Class not found for workspace lock persister "
-                        + wsConfig.getLockManager().getPersister().getType() + ", container " + wsConfig.getUniqueName()
-                        + " : " + e);
-                  }
-               }
-
                if (wsConfig.getLockManager() != null && wsConfig.getLockManager().getType() != null)
                {
                   try
@@ -355,8 +339,10 @@
                }
                else
                {
-                  workspaceContainer.registerComponentImplementation(LockManagerImpl.class);
+                  throw new RepositoryConfigurationException(
+                     "The configuration of lock manager is expected in container " + wsConfig.getUniqueName());
                }
+
                // Query handler
                if (wsConfig.getQueryHandler() != null)
                {

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/FileSystemLockPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/FileSystemLockPersister.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/FileSystemLockPersister.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,319 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.core.lock;
-
-import org.exoplatform.commons.utils.PrivilegedFileHelper;
-import org.exoplatform.commons.utils.SecurityHelper;
-import org.exoplatform.services.jcr.config.LockPersisterEntry;
-import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.dataflow.ItemState;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
-import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
-import org.exoplatform.services.jcr.datamodel.ItemType;
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.datamodel.PropertyData;
-import org.exoplatform.services.jcr.datamodel.QPath;
-import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.core.query.SearchManager;
-import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
-import org.exoplatform.services.jcr.observation.ExtendedEvent;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.security.IdentityConstants;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-
-/**
- * Store information about locks on file system. After start and before stop it remove all lock
- * properties in repository
- * 
- * @author <a href="mailto:Sergey.Kabashnyuk at gmail.com">Sergey Kabashnyuk</a>
- * @version $Id: FileSystemLockPersister.java 11907 2008-03-13 15:36:21Z ksm $
- */
-public class FileSystemLockPersister implements LockPersister
-{
-   /**
-    * Name of the parameter.
-    */
-   private static final String PARAM_ROOT_DIR = "path";
-
-   /**
-    * logger.
-    */
-   private final Log log = ExoLogger.getLogger("exo.jcr.component.core.FileSystemLockPersister");
-
-   /**
-    * The directory which stores information of the locks.
-    */
-   private File rootDir;
-
-   /**
-    * Data manager.
-    */
-   private final WorkspacePersistentDataManager dataManager;
-
-   /**
-    * Lock persister configuration.
-    */
-   private final LockPersisterEntry config;
-
-   /**
-    * @param dataManager
-    * @param config
-    * @throws RepositoryConfigurationException
-    * @throws RepositoryException
-    */
-   public FileSystemLockPersister(WorkspacePersistentDataManager dataManager, WorkspaceEntry config)
-      throws RepositoryConfigurationException, RepositoryException
-   {
-      this.dataManager = dataManager;
-      this.config = config.getLockManager().getPersister();
-      init();
-   }
-
-   /**
-    * @param dataManager
-    * @param config
-    * @param searchManager
-    * @throws RepositoryConfigurationException
-    * @throws RepositoryException
-    */
-   public FileSystemLockPersister(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
-      SearchManager searchManager) throws RepositoryConfigurationException, RepositoryException
-   {
-      this.dataManager = dataManager;
-      this.config = config.getLockManager().getPersister();
-      init();
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see
-    * org.exoplatform.services.jcr.impl.core.lock.LockPersister#add(org.exoplatform.services.jcr.
-    * impl.core.lock.LockData)
-    */
-   public void add(LockData lock) throws LockException
-   {
-      log.debug("add event fire");
-      final File lockFile = new File(rootDir, lock.getNodeIdentifier());
-
-      if (PrivilegedFileHelper.exists(lockFile))
-      {
-         throw new LockException("Persistent lock information already exists");
-      }
-
-      try
-      {
-         SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Void>()
-         {
-            public Void run() throws Exception
-            {
-               lockFile.createNewFile();
-               return null;
-            }
-         });
-      }
-      catch (IOException e)
-      {
-         throw new LockException(e);
-      }
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see
-    * org.exoplatform.services.jcr.impl.core.lock.LockPersister#remove(org.exoplatform.services.jcr
-    * .impl.core.lock.LockData)
-    */
-   public void remove(LockData lock) throws LockException
-   {
-      log.debug("remove event fire");
-      File lockFile = new File(rootDir, lock.getNodeIdentifier());
-      if (!PrivilegedFileHelper.exists(lockFile))
-      {
-         // throw new LockException("Persistent lock information not exists");
-         log.warn("Persistent lock information  for node " + lock.getNodeIdentifier() + " doesn't exists");
-         return;
-      }
-      if (!PrivilegedFileHelper.delete(lockFile))
-      {
-         throw new LockException("Fail to remove lock information");
-      }
-
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see org.exoplatform.services.jcr.impl.core.lock.LockPersister#removeAll()
-    */
-   public void removeAll() throws LockException
-   {
-      if (log.isDebugEnabled())
-      {
-         log.debug("Removing all locks");
-      }
-
-      TransactionChangesLog transactionChangesLog = new TransactionChangesLog();
-
-      String[] list = PrivilegedFileHelper.list(rootDir);
-
-      try
-      {
-         for (int i = 0; i < list.length; i++)
-         {
-            PlainChangesLog plainChangesLog =
-               new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);
-
-            NodeData lockedNodeData = (NodeData)dataManager.getItemData(list[i]);
-            // No item no problem
-            if (lockedNodeData != null)
-            {
-               PropertyData dataLockIsDeep =
-                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
-                     ItemType.PROPERTY);
-
-               if (dataLockIsDeep != null)
-               {
-                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
-                     lockedNodeData.getQPath(), Constants.JCR_LOCKISDEEP), dataLockIsDeep.getIdentifier(), 0,
-                     dataLockIsDeep.getType(), dataLockIsDeep.getParentIdentifier(), dataLockIsDeep.isMultiValued())));
-               }
-
-               PropertyData dataLockOwner =
-                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
-                     ItemType.PROPERTY);
-               if (dataLockOwner != null)
-               {
-                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
-                     lockedNodeData.getQPath(), Constants.JCR_LOCKOWNER), dataLockOwner.getIdentifier(), 0,
-                     dataLockOwner.getType(), dataLockOwner.getParentIdentifier(), dataLockOwner.isMultiValued())));
-               }
-
-               if (plainChangesLog.getSize() > 0)
-               {
-                  transactionChangesLog.addLog(plainChangesLog);
-               }
-            }
-         }
-
-         if (transactionChangesLog.getSize() > 0)
-         {
-            dataManager.save(transactionChangesLog);
-         }
-
-         // remove files
-         for (int i = 0; i < list.length; i++)
-         {
-            File lockFile = new File(rootDir, list[i]);
-            if (!PrivilegedFileHelper.exists(lockFile))
-            {
-               log.warn("Persistent lock information for node id " + list[i] + " doesn't exists");
-            }
-            if (!PrivilegedFileHelper.delete(lockFile))
-            {
-               throw new LockException("Fail to remove lock information");
-            }
-         }
-      }
-      catch (RepositoryException e)
-      {
-         log.error("Unable to remove lock files due to error " + e, e);
-         throw new LockException(e);
-      }
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see org.picocontainer.Startable#start()
-    */
-   public void start()
-   {
-      if (log.isDebugEnabled())
-      {
-         log.debug("Starting FileSystemLockPersister");
-      }
-      try
-      {
-         removeAll();
-      }
-      catch (LockException e)
-      {
-         log.error(e.getLocalizedMessage(), e);
-      }
-
-   }
-
-   /*
-    * (non-Javadoc)
-    * @see org.picocontainer.Startable#stop()
-    */
-   public void stop()
-   {
-      if (log.isDebugEnabled())
-      {
-         log.debug("Stoping FileSystemLockPersister");
-      }
-      if (log.isDebugEnabled())
-      {
-         log.debug("FileSystemLockPersister stoped");
-      }
-   }
-
-   /**
-    * Initialize directory tree for storing lock information.
-    * 
-    * @throws RepositoryConfigurationException
-    * @throws RepositoryException
-    */
-   private void init() throws RepositoryConfigurationException, RepositoryException
-   {
-      String root = config.getParameterValue(PARAM_ROOT_DIR);
-
-      if (root == null)
-      {
-         throw new RepositoryConfigurationException("Repository service configuration." + " Source name ("
-            + PARAM_ROOT_DIR + ") is expected");
-      }
-      rootDir = new File(root);
-      if (PrivilegedFileHelper.exists(rootDir))
-      {
-         if (!PrivilegedFileHelper.isDirectory(rootDir))
-         {
-            throw new RepositoryConfigurationException("'" + root + "' is not a directory");
-         }
-      }
-      else
-      {
-         if (!PrivilegedFileHelper.mkdirs(rootDir))
-         {
-            throw new RepositoryException("Can't create dir" + root);
-         }
-      }
-   }
-}

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,757 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.core.lock;
-
-import org.exoplatform.management.annotations.Managed;
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.management.jmx.annotations.NameTemplate;
-import org.exoplatform.management.jmx.annotations.Property;
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.core.ExtendedSession;
-import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
-import org.exoplatform.services.jcr.dataflow.CompositeChangesLog;
-import org.exoplatform.services.jcr.dataflow.DataManager;
-import org.exoplatform.services.jcr.dataflow.ItemState;
-import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
-import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
-import org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener;
-import org.exoplatform.services.jcr.dataflow.persistent.PersistedPropertyData;
-import org.exoplatform.services.jcr.datamodel.InternalQName;
-import org.exoplatform.services.jcr.datamodel.ItemData;
-import org.exoplatform.services.jcr.datamodel.ItemType;
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.datamodel.PropertyData;
-import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.core.NodeImpl;
-import org.exoplatform.services.jcr.impl.core.SessionDataManager;
-import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
-import org.exoplatform.services.jcr.observation.ExtendedEvent;
-import org.exoplatform.services.jcr.util.IdGenerator;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.security.IdentityConstants;
-import org.picocontainer.Startable;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockException;
-
-/**
- * Created by The eXo Platform SAS.
- * 
- * @author <a href="mailto:gennady.azarenkov at exoplatform.com">Gennady Azarenkov</a>
- * @version $Id: LockManagerImpl.java 12096 2008-03-19 11:42:40Z gazarenkov $
- */
- at Managed
- at NameTemplate(@Property(key = "service", value = "lockmanager"))
-public class LockManagerImpl implements WorkspaceLockManager, ItemsPersistenceListener, Startable
-{
-   /**
-    * Default lock time out. 30min
-    */
-   public static final long DEFAULT_LOCK_TIMEOUT = 1000 * 60 * 30;
-
-   // Search constants
-   /**
-    * The exact lock token.
-    */
-   private static final int SEARCH_EXECMATCH = 1;
-
-   /**
-    * Lock token of closed parent
-    */
-   private static final int SEARCH_CLOSEDPARENT = 2;
-
-   /**
-    * Lock token of closed child
-    */
-   private static final int SEARCH_CLOSEDCHILD = 4;
-
-   /**
-    * Logger
-    */
-   private final Log log = ExoLogger.getLogger("exo.jcr.component.core.LockManagerImpl");
-
-   /**
-    * Map NodeIdentifier -- lockData
-    */
-   private final Map<String, LockData> locks;
-
-   /**
-    * Data manager.
-    */
-   private final DataManager dataManager;
-
-   /**
-    * Map NodeIdentifier -- lockData
-    */
-   private final Map<String, LockData> pendingLocks;
-
-   /**
-    * Map lockToken --lockData
-    */
-   private final Map<String, LockData> tokensMap;
-
-   /**
-    * Run time lock time out.
-    */
-   private long lockTimeOut;
-
-   /**
-    * Lock remover thread.
-    */
-   private LockRemover lockRemover;
-
-   /**
-    * Lock persister instance.
-    */
-   private final LockPersister persister;
-
-   /**
-    * Constructor for workspace without LockPersister
-    * 
-    * @param dataManager
-    * @param config
-    */
-   public LockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
-      LockRemoverHolder lockRemoverHolder)
-   {
-      this(dataManager, config, null, lockRemoverHolder);
-   }
-
-   public LockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config, LockPersister persister,
-      LockRemoverHolder lockRemoverHolder)
-   {
-
-      this.dataManager = dataManager;
-      this.persister = persister;
-      if (config.getLockManager() != null)
-      {
-         lockTimeOut =
-            config.getLockManager().getTimeout() > 0 ? config.getLockManager().getTimeout() : DEFAULT_LOCK_TIMEOUT;
-      }
-      else
-         lockTimeOut = DEFAULT_LOCK_TIMEOUT;
-
-      locks = new HashMap<String, LockData>();
-      pendingLocks = new HashMap<String, LockData>();
-      tokensMap = new HashMap<String, LockData>();
-
-      dataManager.addItemPersistenceListener(this);
-      lockRemover = lockRemoverHolder.getLockRemover(this);
-   }
-
-   public synchronized void addLockToken(String sessionId, String lt)
-   {
-      LockData currLock = tokensMap.get(lt);
-      if (currLock != null)
-      {
-         currLock.addLockHolder(sessionId);
-      }
-   }
-
-   public synchronized Lock addPendingLock(NodeImpl node, boolean isDeep, boolean isSessionScoped, long timeOut)
-      throws LockException
-   {
-      LockData lData = getLockData((NodeData)node.getData(), SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
-      if (lData != null)
-      {
-         if (lData.getNodeIdentifier().equals(node.getInternalIdentifier()))
-         {
-            throw new LockException("Node already locked: " + node.getData().getQPath());
-         }
-         else if (lData.isDeep())
-         {
-            throw new LockException("Parent node has deep lock.");
-         }
-      }
-
-      if (isDeep && getLockData((NodeData)node.getData(), SEARCH_CLOSEDCHILD) != null)
-      {
-         throw new LockException("Some child node is locked.");
-      }
-
-      String lockToken = IdGenerator.generate();
-      lData =
-         new LockData(node.getInternalIdentifier(), lockToken, isDeep, isSessionScoped, node.getSession().getUserID(),
-            timeOut > 0 ? timeOut : lockTimeOut);
-
-      lData.addLockHolder(node.getSession().getId());
-      pendingLocks.put(node.getInternalIdentifier(), lData);
-      tokensMap.put(lockToken, lData);
-
-      LockImpl lock = new LockImpl(node.getSession(), lData);
-      return lock;
-   }
-
-   public LockImpl getLock(NodeImpl node) throws LockException, RepositoryException
-   {
-
-      LockData lData = getLockData((NodeData)node.getData(), SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
-
-      if (lData == null || (!node.getInternalIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
-      {
-         throw new LockException("Node not locked: " + node.getData().getQPath());
-
-      }
-      return new LockImpl(node.getSession(), lData);
-   }
-
-   public synchronized String[] getLockTokens(String sessionID)
-   {
-      List<String> retval = new ArrayList<String>();
-
-      for (LockData lockData : locks.values())
-      {
-         if (lockData.isLockHolder(sessionID))
-            retval.add(lockData.getLockToken(sessionID));
-
-      }
-      return retval.toArray(new String[retval.size()]);
-   }
-
-   public boolean holdsLock(NodeData node) throws RepositoryException
-   {
-      return getLockData(node, SEARCH_EXECMATCH) != null;
-   }
-
-   public boolean isLocked(NodeData node)
-   {
-      LockData lData = getLockData(node, SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
-
-      if (lData == null || (!node.getIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
-      {
-         return false;
-      }
-      return true;
-   }
-
-   public boolean isLockHolder(NodeData node, String sessionId)// throws RepositoryException
-   {
-      LockData lData = getLockData(node, SEARCH_EXECMATCH | SEARCH_CLOSEDPARENT);
-      return lData != null && lData.isLockHolder(sessionId);
-   }
-
-   public synchronized void onCloseSession(ExtendedSession session)
-   {
-      // List<String> deadLocksList = new ArrayList<String>();
-      SessionImpl sessionImpl = (SessionImpl)session;
-      for (Iterator<Map.Entry<String, LockData>> entries = locks.entrySet().iterator(); entries.hasNext();)
-      {
-         Map.Entry<String, LockData> entry = entries.next();
-         LockData lockData = entry.getValue();
-         if (lockData.isLive())
-         {
-            if (lockData.isLockHolder(session.getId()))
-            {
-               if (lockData.isSessionScoped())
-               {
-                  // if no session currently holds lock except this
-                  try
-                  {
-                     ((NodeImpl)sessionImpl.getTransientNodesManager().getItemByIdentifier(
-                        lockData.getNodeIdentifier(), false)).unlock();
-                  }
-                  catch (UnsupportedRepositoryOperationException e)
-                  {
-                     log.error(e.getLocalizedMessage());
-                  }
-                  catch (LockException e)
-                  {
-                     log.error(e.getLocalizedMessage());
-                  }
-                  catch (AccessDeniedException e)
-                  {
-                     log.error(e.getLocalizedMessage());
-                  }
-                  catch (RepositoryException e)
-                  {
-                     log.error(e.getLocalizedMessage());
-                  }
-
-               }
-               else
-               {
-                  lockData.removeLockHolder(session.getId());
-               }
-            }
-         }
-         else
-         {
-            entries.remove();
-         }
-      }
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void onSaveItems(ItemStateChangesLog changesLog)
-   {
-      List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
-      if (changesLog instanceof TransactionChangesLog)
-      {
-         ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();
-
-         while (logIterator.hasNextLog())
-         {
-            chengesLogList.add(logIterator.nextLog());
-         }
-      }
-      else if (changesLog instanceof PlainChangesLog)
-      {
-         chengesLogList.add((PlainChangesLog)changesLog);
-      }
-      else if (changesLog instanceof CompositeChangesLog)
-      {
-         for (ChangesLogIterator iter = ((CompositeChangesLog)changesLog).getLogIterator(); iter.hasNextLog();)
-         {
-            chengesLogList.add(iter.nextLog());
-         }
-      }
-
-      for (PlainChangesLog currChangesLog : chengesLogList)
-      {
-         String nodeIdentifier;
-         try
-         {
-            switch (currChangesLog.getEventType())
-            {
-               case ExtendedEvent.LOCK :
-                  if (currChangesLog.getSize() < 2)
-                  {
-                     log.error("Incorrect changes log  of type ExtendedEvent.LOCK size=" + currChangesLog.getSize()
-                        + "<2 \n" + currChangesLog.dump());
-                     break;
-                  }
-                  nodeIdentifier = currChangesLog.getAllStates().get(0).getData().getParentIdentifier();
-
-                  if (pendingLocks.containsKey(nodeIdentifier))
-                  {
-                     internalLock(nodeIdentifier);
-                  }
-                  else
-                  {
-                     log.warn("No lock in pendingLocks for identifier " + nodeIdentifier
-                        + " Probably lock come from replication.");
-
-                     String lockToken = IdGenerator.generate();
-                     ItemState ownerState = getItemState(currChangesLog, Constants.JCR_LOCKOWNER);
-                     ItemState isDeepState = getItemState(currChangesLog, Constants.JCR_LOCKISDEEP);
-                     if (ownerState != null && isDeepState != null)
-                     {
-
-                        String owner =
-                           new String(((((PersistedPropertyData)(ownerState.getData())).getValues()).get(0))
-                              .getAsByteArray(), Constants.DEFAULT_ENCODING);
-
-                        boolean isDeep =
-                           Boolean.valueOf(
-                              new String(((((PersistedPropertyData)(isDeepState.getData())).getValues()).get(0))
-                                 .getAsByteArray(), Constants.DEFAULT_ENCODING)).booleanValue();
-
-                        createRemoteLock(currChangesLog.getSessionId(), nodeIdentifier, lockToken, isDeep, false, owner);
-                     }
-                  }
-                  break;
-               case ExtendedEvent.UNLOCK :
-                  if (currChangesLog.getSize() < 2)
-                  {
-                     log.error("Incorrect changes log  of type ExtendedEvent.UNLOCK size=" + currChangesLog.getSize()
-                        + "<2 \n" + currChangesLog.dump());
-                     break;
-                  }
-
-                  internalUnLock(currChangesLog.getSessionId(), currChangesLog.getAllStates().get(0).getData()
-                     .getParentIdentifier());
-                  break;
-               default :
-                  HashSet<String> removedLock = new HashSet<String>();
-                  for (ItemState itemState : currChangesLog.getAllStates())
-                  {
-                     // this is a node and node is locked
-                     if (itemState.getData().isNode() && locks.containsKey(itemState.getData().getIdentifier()))
-                     {
-                        nodeIdentifier = itemState.getData().getIdentifier();
-                        if (itemState.isDeleted())
-                        {
-                           removedLock.add(nodeIdentifier);
-                        }
-                        else if (itemState.isAdded() || itemState.isRenamed() || itemState.isUpdated())
-                        {
-                           removedLock.remove(nodeIdentifier);
-                        }
-                     }
-                  }
-                  for (String identifier : removedLock)
-                  {
-                     internalUnLock(currChangesLog.getSessionId(), identifier);
-                  }
-                  break;
-            }
-         }
-         catch (LockException e)
-         {
-            log.error(e.getLocalizedMessage(), e);
-         }
-         catch (UnsupportedEncodingException e)
-         {
-            log.error(e.getLocalizedMessage(), e);
-         }
-         catch (IllegalStateException e)
-         {
-            log.error(e.getLocalizedMessage(), e);
-         }
-         catch (IOException e)
-         {
-            log.error(e.getLocalizedMessage(), e);
-         }
-      }
-   }
-
-   /**
-    * @param sessionId
-    * @param lt
-    */
-   public synchronized void removeLockToken(String sessionId, String lt)
-   {
-      LockData lData = tokensMap.get(lt);
-      if (lData != null && lData.isLockHolder(sessionId))
-      {
-         lData.removeLockHolder(sessionId);
-      }
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void start()
-   {
-      lockRemover.start();
-   }
-
-   // Quick method. We need to reconstruct
-   synchronized List<LockData> getLockList()
-   {
-      return new ArrayList<LockData>(locks.values());
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public synchronized void removeExpired()
-   {
-      final List<String> removeLockList = new ArrayList<String>();
-
-      for (LockData lock : locks.values())
-      {
-         if (!lock.isSessionScoped() && lock.getTimeToDeath() < 0)
-         {
-            removeLockList.add(lock.getNodeIdentifier());
-         }
-      }
-
-      for (String rLock : removeLockList)
-      {
-         removeLock(rLock);
-      }
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void stop()
-   {
-      lockRemover.stop();
-
-      locks.clear();
-      pendingLocks.clear();
-      tokensMap.clear();
-   }
-
-   /**
-    * Copy <code>PropertyData prop<code> to new TransientItemData
-    * 
-    * @param prop
-    * @return
-    * @throws RepositoryException
-    */
-   private TransientItemData copyItemData(PropertyData prop) throws RepositoryException
-   {
-
-      if (prop == null)
-         return null;
-
-      // make a copy, value may be null for deleting items
-      TransientPropertyData newData =
-         new TransientPropertyData(prop.getQPath(), prop.getIdentifier(), prop.getPersistedVersion(), prop.getType(),
-            prop.getParentIdentifier(), prop.isMultiValued(), prop.getValues());
-
-      return newData;
-   }
-
-   /**
-    * Search item with name <code>itemName<code> in changesLog
-    * 
-    * @param changesLog
-    * @param itemName
-    * @return Item
-    */
-   private ItemState getItemState(PlainChangesLog changesLog, InternalQName itemName)
-   {
-      List<ItemState> allStates = changesLog.getAllStates();
-      for (int i = allStates.size() - 1; i >= 0; i--)
-      {
-         ItemState state = allStates.get(i);
-         if (state.getData().getQPath().getName().equals(itemName))
-            return state;
-      }
-      return null;
-   }
-
-   /**
-    * Search lock in maps.
-    * 
-    * @param data
-    * @param searchType
-    * @return
-    */
-   private LockData getLockData(NodeData data, int searchType)
-   {
-      if (data == null || locks.size() == 0)
-         return null;
-      LockData retval = null;
-      try
-      {
-         if ((searchType & SEARCH_EXECMATCH) != 0)
-         {
-            retval = locks.get(data.getIdentifier());
-         }
-         if (retval == null && (searchType & SEARCH_CLOSEDPARENT) != 0)
-         {
-
-            NodeData parentData = (NodeData)dataManager.getItemData(data.getParentIdentifier());
-            if (parentData != null)
-            {
-               retval = locks.get(parentData.getIdentifier());
-               // parent not found try to fo upper
-               if (retval == null)
-               {
-                  retval = getLockData(parentData, SEARCH_CLOSEDPARENT);
-               }
-            }
-         }
-         if (retval == null && (searchType & SEARCH_CLOSEDCHILD) != 0)
-         {
-
-            List<NodeData> childData = dataManager.getChildNodesData(data);
-            for (NodeData nodeData : childData)
-            {
-               retval = locks.get(nodeData.getIdentifier());
-               if (retval != null)
-                  break;
-            }
-            if (retval == null)
-            {
-               // child not found try to find diper
-               for (NodeData nodeData : childData)
-               {
-                  retval = getLockData(nodeData, SEARCH_CLOSEDCHILD);
-                  if (retval != null)
-                     break;
-               }
-            }
-         }
-      }
-      catch (RepositoryException e)
-      {
-         return null;
-      }
-
-      return retval;
-   }
-
-   /**
-    * Internal lock
-    * 
-    * @param nodeIdentifier
-    * @throws LockException
-    */
-   private synchronized void internalLock(String nodeIdentifier) throws LockException
-   {
-      LockData ldata = pendingLocks.get(nodeIdentifier);
-      if (ldata != null)
-      {
-         locks.put(nodeIdentifier, ldata);
-
-         if (persister != null)
-         {
-            persister.add(ldata);
-         }
-         pendingLocks.remove(nodeIdentifier);
-      }
-      else
-      {
-         throw new LockException("No lock in pending locks");
-      }
-   }
-
-   /**
-    * Internal unlock.
-    * 
-    * @param sessionId
-    * @param nodeIdentifier
-    * @throws LockException
-    */
-   private synchronized void internalUnLock(String sessionId, String nodeIdentifier) throws LockException
-   {
-      LockData lData = locks.get(nodeIdentifier);
-
-      if (lData != null)
-      {
-         tokensMap.remove(lData.getLockToken(sessionId));
-         locks.remove(nodeIdentifier);
-
-         lData.setLive(false);
-         if (persister != null)
-         {
-            persister.remove(lData);
-         }
-         lData = null;
-      }
-   }
-
-   /**
-    * For locks comes from remote JCRs (replication usecase)
-    * 
-    * @param sessionId
-    *          String
-    * @param nodeIdentifier
-    *          String
-    * @param lockToken
-    *          String
-    * @param isDeep
-    *          boolean
-    * @param sessionScoped
-    *          boolean
-    * @param owner
-    *          String
-    * @return LockData
-    */
-   private synchronized LockData createRemoteLock(String sessionId, String nodeIdentifier, String lockToken,
-      boolean isDeep, boolean sessionScoped, String owner)
-   {
-      LockData lData = new LockData(nodeIdentifier, lockToken, isDeep, sessionScoped, owner, lockTimeOut);
-      lData.addLockHolder(sessionId);
-      locks.put(nodeIdentifier, lData);
-      tokensMap.put(lockToken, lData);
-
-      return lData;
-   }
-
-   /**
-    * Remove lock, used by Lock remover.
-    * 
-    * @param nodeIdentifier String
-    */
-   protected void removeLock(String nodeIdentifier)
-   {
-      try
-      {
-         NodeData nData = (NodeData)dataManager.getItemData(nodeIdentifier);
-         PlainChangesLog changesLog =
-            new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);
-
-         ItemData lockOwner =
-            copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKOWNER, 1),
-               ItemType.PROPERTY));
-
-         changesLog.add(ItemState.createDeletedState(lockOwner));
-
-         ItemData lockIsDeep =
-            copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKISDEEP, 1),
-               ItemType.PROPERTY));
-         changesLog.add(ItemState.createDeletedState(lockIsDeep));
-
-         // lock probably removed by other thread
-         if (lockOwner == null && lockIsDeep == null)
-            return;
-         dataManager.save(new TransactionChangesLog(changesLog));
-      }
-      catch (RepositoryException e)
-      {
-         log.error("Error occur during removing lock" + e.getLocalizedMessage());
-      }
-   }
-
-   @Managed
-   @ManagedDescription("The number of active locks")
-   public int getNumLocks()
-   {
-      return locks.size();
-   }
-
-   @Managed
-   @ManagedDescription("Remove the expired locks")
-   public void cleanExpiredLocks()
-   {
-      removeExpired();
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public boolean isTXAware()
-   {
-      return true;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
-   {
-      return new SessionLockManagerImpl(sessionId, this, transientManager);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void closeSessionLockManager(String sessionId)
-   {
-      //do nothing
-   }
-}

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockPersister.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockPersister.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockPersister.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.core.lock;
-
-import org.picocontainer.Startable;
-
-import javax.jcr.lock.LockException;
-
-/**
- * Class for storing information about locks And will be notified about add and removing a lock
- * 
- * @author <a href="mailto:Sergey.Kabashnyuk at gmail.com">Sergey Kabashnyuk</a>
- * @version $Id: LockPersister.java 11907 2008-03-13 15:36:21Z ksm $
- */
-public interface LockPersister extends Startable
-{
-   /**
-    * Add lock information to the persistent storage
-    * 
-    * @param lock
-    * @throws LockException
-    */
-   void add(LockData lock) throws LockException;
-
-   /**
-    * Remove lock from persistent storage
-    * 
-    * @param lock
-    * @throws LockException
-    */
-   void remove(LockData lock) throws LockException;
-
-   /**
-    * Remove all locks from persistent storage
-    * 
-    * @throws LockException
-    */
-   void removeAll() throws LockException;
-
-}

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/SessionLockManagerImpl.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock;
-
-import org.exoplatform.services.jcr.core.ExtendedSession;
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.impl.core.NodeImpl;
-import org.exoplatform.services.jcr.impl.core.SessionDataManager;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockException;
-
-/**
- * Created by The eXo Platform SAS.
- * 
- * <br/>Date: 
- *
- * @author <a href="karpenko.sergiy at gmail.com">Karpenko Sergiy</a> 
- * @version $Id$
- */
-public class SessionLockManagerImpl extends AbstractSessionLockManager
-{
-
-   private final String sessionId;
-
-   private final LockManagerImpl lockManager;
-
-   /**
-    * Constructor
-    */
-   public SessionLockManagerImpl(String sessionId, LockManagerImpl lockManager, SessionDataManager transientManager)
-   {
-      super(transientManager);
-      this.sessionId = sessionId;
-      this.lockManager = lockManager;
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public Lock addLock(NodeImpl node, boolean isDeep, boolean isSessionScoped, long timeOut) throws LockException,
-      RepositoryException
-   {
-      return lockManager.addPendingLock(node, isDeep, isSessionScoped, timeOut);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void addLockToken(String lt)
-   {
-      lockManager.addLockToken(sessionId, lt);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public LockImpl getLock(NodeImpl node) throws LockException, RepositoryException
-   {
-      return lockManager.getLock(node);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public String[] getLockTokens()
-   {
-      return lockManager.getLockTokens(sessionId);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public boolean holdsLock(NodeData node) throws RepositoryException
-   {
-      return lockManager.holdsLock(node);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   protected boolean isPersistedLockHolder(NodeData node)// throws RepositoryException
-   {
-      return lockManager.isLockHolder(node, sessionId);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   protected boolean isLockedPersisted(NodeData node) throws LockException
-   {
-      return lockManager.isLocked(node);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void removeLockToken(String lt)
-   {
-      lockManager.removeLockToken(sessionId, lt);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   public void onCloseSession(ExtendedSession session)
-   {
-      lockManager.onCloseSession(session);
-   }
-
-   /**
-    * {@inheritDoc}
-    */
-   protected boolean checkPersistedLocks(NodeData node) throws LockException
-   {
-      return (!isLockedPersisted(node) || isPersistedLockHolder(node));
-   }
-}

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -171,11 +171,6 @@
             long timeOut = config.getLockManager().getParameterTime(TIME_OUT);
             lockTimeOut = timeOut > 0 ? timeOut : DEFAULT_LOCK_TIMEOUT;
          }
-         else
-         {
-            lockTimeOut =
-               config.getLockManager().getTimeout() > 0 ? config.getLockManager().getTimeout() : DEFAULT_LOCK_TIMEOUT;
-         }
       }
       else
       {

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/binding.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/binding.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -78,16 +78,6 @@
       <collection name="properties" field="parameters" usage="optional"
         item-type="org.exoplatform.services.jcr.config.SimpleParameterEntry"
         factory="org.jibx.runtime.Utility.arrayListFactory" />
-      <value name="time-out" field="timeout" usage="optional"
-              serializer="org.exoplatform.services.jcr.util.ConfigurationFormat.serializeTime" 
-			  deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseTime" /> 
-              
-      <structure name="persister" field="persister" usage="optional">
-        <value name="class" field="type" style="attribute" />
-        <collection name="properties" field="parameters" usage="optional"
-          item-type="org.exoplatform.services.jcr.config.SimpleParameterEntry"
-          factory="org.jibx.runtime.Utility.arrayListFactory" />
-      </structure>
     </structure>
   </mapping>
 

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/configuration.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/configuration.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/configuration.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -22,24 +22,6 @@
 <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
    xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
 
-   <!-- component>
-      <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
-      <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
-      <init-params>
-         <value-param>
-            <name>conf-path</name>
-            <description>JCR configuration file</description>
-            <value>jar:/conf/portal/exo-jcr-config.xml</value>
-         </value-param>
-      </init-params>
-   </component 
-   -->
-  
-   <!-- component>
-      <key>org.exoplatform.services.jcr.RepositoryService</key>
-      <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
-   </component
-   -->
   <component>
     <type>org.exoplatform.services.jcr.impl.RepositoryCreationSynchronizer</type>
     <init-params>

Deleted: jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1,166 +0,0 @@
-<!--
-
-    Copyright (C) 2009 eXo Platform SAS.
-
-    This is free software; you can redistribute it and/or modify it
-    under the terms of the GNU Lesser General Public License as
-    published by the Free Software Foundation; either version 2.1 of
-    the License, or (at your option) any later version.
-
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this software; if not, write to the Free
-    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-    02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
--->
-<repository-service default-repository="repository">
-   <repositories>
-      <repository name="repository" system-workspace="production" default-workspace="production">
-         <security-domain>exo-domain</security-domain>
-         <access-control>optional</access-control>
-         <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
-         <workspaces>
-            <workspace name="production">
-               <!-- for system storage -->
-               <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
-                  <properties>
-                     <property name="source-name" value="jdbcjcr" />
-                     <property name="multi-db" value="false" />
-                     <property name="max-buffer-size" value="200k" />
-                     <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/production" />
-                  </properties>
-                  <value-storages>
-                     <value-storage id="production" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
-                        <properties>
-                           <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/production" />
-                        </properties>
-                        <filters>
-                           <filter property-type="Binary" />
-                        </filters>
-                     </value-storage>
-                  </value-storages>
-               </container>
-               <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
-                  <properties>
-                     <property name="root-nodetype" value="nt:unstructured" />
-                  </properties>
-               </initializer>
-               <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
-                  <properties>
-                     <property name="max-size" value="10k" />
-                     <property name="live-time" value="1h" />
-                  </properties>
-               </cache>
-               <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
-                  <properties>
-                     <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/production" />
-                  </properties>
-               </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="${exo.jcr.parent.dir:..}/temp/lock/production" />
-                     </properties>
-                  </persister>
-               </lock-manager>
-            </workspace>
-
-            <workspace name="backup">
-               <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
-                  <properties>
-                     <property name="source-name" value="jdbcjcr" />
-                     <property name="multi-db" value="false" />
-                     <property name="max-buffer-size" value="200k" />
-                     <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/backup" />
-                  </properties>
-                  <value-storages>
-                     <value-storage id="backup" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
-                        <properties>
-                           <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/backup" />
-                        </properties>
-                        <filters>
-                           <filter property-type="Binary" />
-                        </filters>
-                     </value-storage>
-                  </value-storages>
-               </container>
-               <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
-                  <properties>
-                     <property name="root-nodetype" value="nt:unstructured" />
-                  </properties>
-               </initializer>
-               <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
-                  <properties>
-                     <property name="max-size" value="10k" />
-                     <property name="live-time" value="1h" />
-                  </properties>
-               </cache>
-               <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
-                  <properties>
-                     <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/backup" />
-                  </properties>
-               </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="${exo.jcr.parent.dir:..}/temp/lock/backup" />
-                     </properties>
-                  </persister>
-               </lock-manager>               
-            </workspace>
-
-            <workspace name="digital-assets">
-               <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
-                  <properties>
-                     <property name="source-name" value="jdbcjcr" />
-                     <property name="multi-db" value="false" />
-                     <property name="max-buffer-size" value="200k" />
-                     <property name="swap-directory" value="${exo.jcr.parent.dir:..}/temp/swap/digital-assets" />
-                  </properties>
-                  <value-storages>
-                     <value-storage id="digital-assets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
-                        <properties>
-                           <property name="path" value="${exo.jcr.parent.dir:..}/temp/values/digital-assets" />
-                        </properties>
-                        <filters>
-                           <filter property-type="Binary" />
-                        </filters>
-                     </value-storage>
-                  </value-storages>
-               </container>
-               <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
-                  <properties>
-                     <property name="root-nodetype" value="nt:folder" />
-                  </properties>
-               </initializer>
-               <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
-                  <properties>
-                     <property name="max-size" value="5k" />
-                     <property name="live-time" value="15m" />
-                  </properties>
-               </cache>
-               <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
-                  <properties>
-                     <property name="index-dir" value="${exo.jcr.parent.dir:..}/temp/jcrlucenedb/digital-assets" />
-                  </properties>
-               </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="${exo.jcr.parent.dir:..}/temp/lock/digital-assets" />
-                     </properties>
-                  </persister>
-               </lock-manager>               
-            </workspace>
-         </workspaces>
-      </repository>
-   </repositories>
-</repository-service>

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestRepositoryManagement.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestRepositoryManagement.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestRepositoryManagement.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -72,8 +72,6 @@
    public void testMarshalUnmarshalRepositoryConfiguration() throws Exception
    {
       ManageableRepository newRepository = helper.createRepository(container, false, null);
-      final long lockManagerTimeOut =
-         newRepository.getConfiguration().getWorkspaceEntries().get(0).getLockManager().getTimeout();
 
       // 1st marshal configuration
       File tempFile = PrivilegedFileHelper.createTempFile("test-config", "xml");
@@ -100,8 +98,6 @@
       // 1st check
       RepositoryEntry unmarshledRepositoryEntry =
          conf.getRepositoryConfiguration(newRepository.getConfiguration().getName());
-      assertEquals(lockManagerTimeOut, unmarshledRepositoryEntry.getWorkspaceEntries().get(0).getLockManager()
-         .getTimeout());
 
       
       // 2nd marshal configuration
@@ -127,8 +123,6 @@
       // 2nd check
       unmarshledRepositoryEntry =
          conf.getRepositoryConfiguration(newRepository.getConfiguration().getName());
-      assertEquals(lockManagerTimeOut, unmarshledRepositoryEntry.getWorkspaceEntries().get(0).getLockManager()
-         .getTimeout());
    }
 
    public void testAddNewRepositoryWithSameName() throws Exception

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockImpl.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockImpl.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -35,7 +35,7 @@
 {
    private ExtendedNode lockedNode = null;
 
-   private LockManagerImpl service;
+   private WorkspaceLockManager service;
 
    private static final long LOCK_TIMEOUT = 5; // sec
 
@@ -48,7 +48,7 @@
 
       super.setUp();
 
-      service = (LockManagerImpl)container.getComponentInstanceOfType(LockManagerImpl.class);
+      service = (WorkspaceLockManager)container.getComponentInstanceOfType(WorkspaceLockManager.class);
 
       if (lockedNode == null)
          try

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -24,7 +24,6 @@
 import org.exoplatform.services.jcr.config.CacheEntry;
 import org.exoplatform.services.jcr.config.ContainerEntry;
 import org.exoplatform.services.jcr.config.LockManagerEntry;
-import org.exoplatform.services.jcr.config.LockPersisterEntry;
 import org.exoplatform.services.jcr.config.QueryHandlerEntry;
 import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
 import org.exoplatform.services.jcr.config.RepositoryEntry;
@@ -33,13 +32,9 @@
 import org.exoplatform.services.jcr.config.ValueStorageFilterEntry;
 import org.exoplatform.services.jcr.config.WorkspaceEntry;
 import org.exoplatform.services.jcr.core.ManageableRepository;
-import org.exoplatform.services.jcr.impl.core.RepositoryImpl;
-import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
-import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer;
 import org.exoplatform.services.log.ExoLogger;
 import org.exoplatform.services.log.Log;
 
-import java.sql.Connection;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
@@ -237,16 +232,44 @@
       cacheEntry.setEnabled(cacheEnabled);
       cacheEntry.setType("org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl");
 
-      // Lock
       LockManagerEntry lockManagerEntry = new LockManagerEntry();
-      lockManagerEntry.setTimeout(900000);
-      LockPersisterEntry lockPersisterEntry = new LockPersisterEntry();
-      lockPersisterEntry.setType("org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister");
-      ArrayList<SimpleParameterEntry> lockPersisterParameters = new ArrayList<SimpleParameterEntry>();
-      lockPersisterParameters.add(new SimpleParameterEntry("path", "target/temp/lock/" + wsName));
-      lockPersisterEntry.setParameters(lockPersisterParameters);
-      lockManagerEntry.setPersister(lockPersisterEntry);
+      lockManagerEntry.putParameterValue("time-out", "15m");
 
+      // ISPN Lock
+      try
+      {
+         Class.forName("org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl");
+
+         lockManagerEntry
+            .setType("org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl");
+         lockManagerEntry.putParameterValue("infinispan-configuration", "conf/standalone/test-infinispan-lock.xml");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.table.name", "lk");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.table.create", "true");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.table.drop", "false");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.id.column", "id");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.data.column", "data");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.timestamp.column", "timestamp");
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.datasource", dsName);
+         lockManagerEntry.putParameterValue("infinispan-cl-cache.jdbc.connectionFactory",
+            "org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory");
+      }
+      catch (ClassNotFoundException e)
+      {
+         // JBC Lock
+         lockManagerEntry.setType("org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl");
+         lockManagerEntry.putParameterValue("jbosscache-configuration", "conf/standalone/test-jbosscache-lock.xml");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.name", "jcrlocks");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.create", "true");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.drop", "false");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.primarykey",
+            "jcrlocks_" + IdGenerator.generate());
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.fqn.column", "fqn");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.node.column", "node");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.parent.column", "parent");
+         lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.datasource", dsName);
+         lockManagerEntry.putParameterValue("jbosscache-shareable", "${jbosscache-shareable}");
+      }
+
       WorkspaceEntry workspaceEntry = new WorkspaceEntry();
       workspaceEntry.setContainer(containerEntry);
       workspaceEntry.setCache(cacheEntry);
@@ -272,130 +295,6 @@
       return ids;
    }
 
-   @Deprecated
-   public WorkspaceEntry getNewWs(String wsName, boolean isMultiDb, String dsName, String vsPath, ContainerEntry entry,
-      boolean newMultiDbDS) throws Exception
-   {
-
-      String dbDialect = null;
-      if (dsName != null)
-      {
-         DataSource ds = (DataSource)new InitialContext().lookup(dsName);
-         if (ds != null)
-         {
-            Connection jdbcConn = null;
-
-            jdbcConn = ds.getConnection();
-            dbDialect = DialectDetecter.detect(jdbcConn.getMetaData());
-
-         }
-      }
-
-      if (newMultiDbDS && (isMultiDb || dsName == null))
-      {
-         dsName = createDatasource();
-      }
-
-      List params = new ArrayList();
-
-      params.add(new SimpleParameterEntry("source-name", dsName));
-      params.add(new SimpleParameterEntry("db-type", "generic"));
-      params.add(new SimpleParameterEntry("multi-db", isMultiDb ? "true" : "false"));
-      params.add(new SimpleParameterEntry("max-buffer-size", "204800"));
-
-      if (dbDialect != null)
-      {
-         params.add(new SimpleParameterEntry(JDBCWorkspaceDataContainer.DB_DIALECT, dbDialect));
-      }
-      else if (entry.getParameterValue(JDBCWorkspaceDataContainer.DB_DIALECT) != null)
-      {
-         params.add(new SimpleParameterEntry(JDBCWorkspaceDataContainer.DB_DIALECT, entry
-            .getParameterValue(JDBCWorkspaceDataContainer.DB_DIALECT)));
-      }
-
-      String oldSwap = entry.getParameterValue("swap-directory");
-      String newSwap = oldSwap.substring(0, oldSwap.lastIndexOf('/')) + '/' + wsName;
-
-      params.add(new SimpleParameterEntry("swap-directory", newSwap));
-
-      ContainerEntry containerEntry =
-         new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer",
-            (ArrayList)params);
-      containerEntry.setParameters(params);
-
-      if (vsPath != null)
-      {
-
-         ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();
-         ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
-         filterEntry.setPropertyType("Binary");
-         vsparams.add(filterEntry);
-
-         ValueStorageEntry valueStorageEntry =
-            new ValueStorageEntry("org.exoplatform.services.jcr.impl.storage.value.fs.SimpleFileValueStorage", vsparams);
-         ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
-         spe.add(new SimpleParameterEntry("path", vsPath));
-         valueStorageEntry.setId(IdGenerator.generate());
-         valueStorageEntry.setParameters(spe);
-         valueStorageEntry.setFilters(vsparams);
-
-         // containerEntry.setValueStorages();
-         containerEntry.setParameters(params);
-         ArrayList list = new ArrayList(1);
-         list.add(valueStorageEntry);
-
-         containerEntry.setValueStorages(list);
-
-      }
-
-      // Indexer
-      ArrayList qParams = new ArrayList();
-      qParams.add(new SimpleParameterEntry("indexDir", "target/temp/index/" + IdGenerator.generate()));
-      QueryHandlerEntry qEntry =
-         new QueryHandlerEntry("org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex", qParams);
-
-      WorkspaceEntry workspaceEntry =
-         new WorkspaceEntry(wsName != null ? wsName : IdGenerator.generate(), "nt:unstructured");
-      workspaceEntry.setContainer(containerEntry);
-
-      ArrayList cacheParams = new ArrayList();
-
-      cacheParams.add(new SimpleParameterEntry("maxSize", "2000"));
-      cacheParams.add(new SimpleParameterEntry("liveTime", "20m"));
-      CacheEntry cacheEntry = new CacheEntry(cacheParams);
-      cacheEntry.setType("org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl");
-
-      workspaceEntry.setCache(cacheEntry);
-
-      workspaceEntry.setQueryHandler(qEntry);
-
-      LockManagerEntry lockManagerEntry = new LockManagerEntry();
-      lockManagerEntry.setTimeout(900000);
-      LockPersisterEntry persisterEntry = new LockPersisterEntry();
-      persisterEntry.setType("org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister");
-      ArrayList lpParams = new ArrayList();
-      lpParams.add(new SimpleParameterEntry("path", "target/temp/lock"));
-      persisterEntry.setParameters(lpParams);
-      lockManagerEntry.setPersister(persisterEntry);
-      workspaceEntry.setLockManager(lockManagerEntry);
-
-      // workspaceEntry
-      return workspaceEntry;
-   }
-
-   @Deprecated
-   public void createWorkspace(WorkspaceEntry workspaceEntry, ExoContainer container)
-      throws RepositoryConfigurationException, RepositoryException
-   {
-      RepositoryService service = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
-      RepositoryImpl defRep;
-
-      defRep = (RepositoryImpl)service.getDefaultRepository();
-      defRep.configWorkspace(workspaceEntry);
-      defRep.createWorkspace(workspaceEntry.getName());
-
-   }
-
    public static TesterConfigurationHelper getInstance()
    {
       if (instance == null)

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ProxyWorkspaceDataReceiver.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ProxyWorkspaceDataReceiver.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ProxyWorkspaceDataReceiver.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -19,7 +19,7 @@
 package org.exoplatform.services.jcr.ext.replication;
 
 import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-import org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;
+import org.exoplatform.services.jcr.impl.core.lock.WorkspaceLockManager;
 import org.exoplatform.services.jcr.impl.core.query.SearchManager;
 import org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager;
 
@@ -43,7 +43,7 @@
     * @throws RepositoryConfigurationException
     *           will be generated RepositoryConfigurationException
     */
-   public ProxyWorkspaceDataReceiver(CacheableWorkspaceDataManager dataManager, LockManagerImpl lockManager)
+   public ProxyWorkspaceDataReceiver(CacheableWorkspaceDataManager dataManager, WorkspaceLockManager lockManager)
       throws RepositoryConfigurationException
    {
       this(dataManager, null, lockManager);
@@ -91,7 +91,7 @@
     *           will be generated the RepositoryConfigurationException
     */
    public ProxyWorkspaceDataReceiver(CacheableWorkspaceDataManager dataManager, SearchManager searchManager,
-      LockManagerImpl lockManager) throws RepositoryConfigurationException
+      WorkspaceLockManager lockManager) throws RepositoryConfigurationException
    {
       dataKeeper = new WorkspaceDataManagerProxy(dataManager, searchManager, lockManager);
    }

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataManagerProxy.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -21,7 +21,7 @@
 import org.exoplatform.services.jcr.dataflow.ItemDataKeeper;
 import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
 import org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener;
-import org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;
+import org.exoplatform.services.jcr.impl.core.lock.WorkspaceLockManager;
 import org.exoplatform.services.jcr.impl.core.query.SearchManager;
 import org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager;
 import org.exoplatform.services.log.ExoLogger;
@@ -67,7 +67,7 @@
     *          the LockManagerImpl
     */
    public WorkspaceDataManagerProxy(CacheableWorkspaceDataManager dataManager, SearchManager searchIndex,
-      LockManagerImpl lockManager)
+      WorkspaceLockManager lockManager)
    {
       this.listeners = new ArrayList<ItemsPersistenceListener>();
       listeners.add(dataManager.getCache());
@@ -78,7 +78,7 @@
 
       if (lockManager != null)
       {
-         listeners.add(lockManager);
+         listeners.add((ItemsPersistenceListener)lockManager);
       }
 
       log.info("WorkspaceDataManagerProxy is instantiated");

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/util/TesterConfigurationHelper.java	2012-01-03 14:33:36 UTC (rev 5414)
@@ -23,6 +23,7 @@
 import org.exoplatform.services.jcr.RepositoryService;
 import org.exoplatform.services.jcr.config.CacheEntry;
 import org.exoplatform.services.jcr.config.ContainerEntry;
+import org.exoplatform.services.jcr.config.LockManagerEntry;
 import org.exoplatform.services.jcr.config.QueryHandlerEntry;
 import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
 import org.exoplatform.services.jcr.config.RepositoryEntry;
@@ -31,6 +32,7 @@
 import org.exoplatform.services.jcr.config.ValueStorageFilterEntry;
 import org.exoplatform.services.jcr.config.WorkspaceEntry;
 import org.exoplatform.services.jcr.core.ManageableRepository;
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer;
 import org.exoplatform.services.log.ExoLogger;
 import org.exoplatform.services.log.Log;
 
@@ -187,12 +189,30 @@
       CacheEntry cacheEntry = new CacheEntry(params);
       cacheEntry.setType(baseWorkspaceEntry.getCache().getType());
 
+      // Lock
+      LockManagerEntry lockManagerEntry = new LockManagerEntry();
+      lockManagerEntry.setType("org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl");
+      lockManagerEntry.putParameterValue("time-out", "15m");
+      lockManagerEntry.putParameterValue("jbosscache-configuration", "conf/standalone/test-jbosscache-lock.xml");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.name", "jcrlocks");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.create", "true");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.drop", "false");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.primarykey",
+         "jcrlocks_" + IdGenerator.generate());
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.fqn.column", "fqn");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.node.column", "node");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.parent.column", "parent");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.datasource", baseWorkspaceEntry.getContainer()
+         .getParameterValue(JDBCWorkspaceDataContainer.SOURCE_NAME));
+      lockManagerEntry.putParameterValue("jbosscache-shareable", "${jbosscache-shareable}");
+
       WorkspaceEntry workspaceEntry = new WorkspaceEntry();
       workspaceEntry.setContainer(containerEntry);
       workspaceEntry.setCache(cacheEntry);
       workspaceEntry.setQueryHandler(qEntry);
       workspaceEntry.setName(baseWorkspaceEntry.getName());
       workspaceEntry.setUniqueName(baseWorkspaceEntry.getUniqueName());
+      workspaceEntry.setLockManager(lockManagerEntry);
 
       return workspaceEntry;
 
@@ -321,7 +341,24 @@
       CacheEntry cacheEntry = new CacheEntry(cacheParams);
       cacheEntry.setType("org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl");
 
+      // Lock
+      LockManagerEntry lockManagerEntry = new LockManagerEntry();
+      lockManagerEntry.setType("org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl");
+      lockManagerEntry.putParameterValue("time-out", "15m");
+      lockManagerEntry.putParameterValue("jbosscache-configuration", "conf/standalone/test-jbosscache-lock.xml");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.name", "jcrlocks");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.create", "true");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.drop", "false");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.table.primarykey",
+         "jcrlocks_" + IdGenerator.generate());
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.fqn.column", "fqn");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.node.column", "node");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.parent.column", "parent");
+      lockManagerEntry.putParameterValue("jbosscache-cl-cache.jdbc.datasource", dsName);
+      lockManagerEntry.putParameterValue("jbosscache-shareable", "${jbosscache-shareable}");
+
       WorkspaceEntry workspaceEntry = new WorkspaceEntry();
+      workspaceEntry.setLockManager(lockManagerEntry);
       workspaceEntry.setContainer(containerEntry);
       workspaceEntry.setCache(cacheEntry);
       workspaceEntry.setQueryHandler(qEntry);

Added: jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jbosscache-lock.xml	                        (rev 0)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jbosscache-lock.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -0,0 +1,32 @@
+<?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">
+
+   <locking useLockStriping="false" concurrencyLevel="500" lockParentForChildInsertRemove="false"
+      lockAcquisitionTimeout="20000" />
+
+   <loaders passivation="false" shared="true">
+ 	  <!-- All the data of the JCR locks needs to be loaded at startup -->
+ 	  <preload>
+	     <node fqn="/" />
+	  </preload>   
+      <!--
+			For another cache-loader class you should use another template with
+			cache-loader specific parameters
+		-->
+      <loader class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader" async="false" fetchPersistentState="false"
+         ignoreModifications="false" purgeOnStartup="false">
+         <properties>
+            cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
+            cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
+            cache.jdbc.table.drop=${jbosscache-cl-cache.jdbc.table.drop}
+            cache.jdbc.table.primarykey=${jbosscache-cl-cache.jdbc.table.primarykey}
+            cache.jdbc.fqn.column=${jbosscache-cl-cache.jdbc.fqn.column}
+            cache.jdbc.fqn.type=${jbosscache-cl-cache.jdbc.fqn.type}
+            cache.jdbc.node.column=${jbosscache-cl-cache.jdbc.node.column}
+            cache.jdbc.node.type=${jbosscache-cl-cache.jdbc.node.type}
+            cache.jdbc.parent.column=${jbosscache-cl-cache.jdbc.parent.column}
+            cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
+			</properties>
+      </loader>
+   </loaders>
+</jbosscache>

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config-backup.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config-backup.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config-backup.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -60,8 +60,20 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db3ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>54000</time-out>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr6" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -100,9 +112,21 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db3ws1" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>54000</time-out>
-               </lock-manager>               
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr6" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>
@@ -147,8 +171,20 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db4ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr7" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -187,9 +223,21 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db4ws1" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-               </lock-manager>               
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr6" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>    

Modified: jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ext/src/test/resources/conf/standalone/test-jcr-ext-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -57,7 +57,23 @@
                      <property name="index-dir" value="target/temp/index/ws" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws1">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -79,7 +95,23 @@
                      <property name="index-dir" value="target/temp/index/ws1" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr1" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws2" auto-init-root-nodetype="nt:unstructured">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -101,7 +133,23 @@
                      <property name="index-dir" value="target/temp/index/ws2" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr2" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws3" auto-init-root-nodetype="nt:unstructured">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -123,7 +171,23 @@
                      <property name="index-dir" value="target/temp/index/ws3" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr3" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws4" auto-init-root-nodetype="nt:unstructured">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -145,7 +209,23 @@
                      <property name="index-dir" value="target/temp/index/ws4" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr4" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws5" auto-init-root-nodetype="nt:unstructured">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -167,9 +247,25 @@
                      <property name="index-dir" value="target/temp/index/ws5" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr5" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
-      </repository>
+      </repository>\
+
       <repository name="db2" system-workspace="ws" default-workspace="ws">
          <security-domain>exo-domain</security-domain>
          <access-control>optional</access-control>
@@ -197,6 +293,21 @@
                      <property name="index-dir" value="target/temp/index/db2_ws" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr19" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>
@@ -241,8 +352,20 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db3ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>54000</time-out>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr6" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -281,9 +404,21 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db3ws1" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>54000</time-out>
-               </lock-manager>               
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr6" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>
@@ -328,8 +463,20 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db4ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr7" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -368,9 +515,21 @@
                      <property name="index-dir" value="target/temp/jcrlucenedb/db4ws1" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-               </lock-manager>               
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr8" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>     
@@ -401,8 +560,24 @@
                   <properties>
                      <property name="index-dir" value="target/temp/index/db5_ws" />
                   </properties>
-               </query-handler>
+               </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr21" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws1">
                <!-- for system storage -->
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
@@ -425,9 +600,25 @@
                      <property name="index-dir" value="target/temp/index/db5_ws1" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr23" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>
+
       <repository name="db6" system-workspace="ws" default-workspace="ws">
          <security-domain>exo-domain</security-domain>
          <access-control>optional</access-control>
@@ -455,7 +646,23 @@
                      <property name="index-dir" value="target/temp/index/db6_ws" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr24" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws1">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -477,7 +684,23 @@
                      <property name="index-dir" value="target/temp/index/db6_ws1" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr25" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws2">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -499,6 +722,21 @@
                      <property name="index-dir" value="target/temp/index/db6_ws2" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr26" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>
@@ -540,7 +778,23 @@
                      <property name="index-dir" value="target/temp/index/db7_ws" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr_to_repository_restore_singel_db" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
+
             <workspace name="ws1">
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
                   <properties>
@@ -572,6 +826,21 @@
                      <property name="index-dir" value="target/temp/index/db7_ws1" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr_to_repository_restore_singel_db" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>

Added: jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jbosscache-lock.xml	                        (rev 0)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jbosscache-lock.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -0,0 +1,32 @@
+<?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">
+
+   <locking useLockStriping="false" concurrencyLevel="500" lockParentForChildInsertRemove="false"
+      lockAcquisitionTimeout="20000" />
+
+   <loaders passivation="false" shared="true">
+ 	  <!-- All the data of the JCR locks needs to be loaded at startup -->
+ 	  <preload>
+	     <node fqn="/" />
+	  </preload>   
+      <!--
+			For another cache-loader class you should use another template with
+			cache-loader specific parameters
+		-->
+      <loader class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader" async="false" fetchPersistentState="false"
+         ignoreModifications="false" purgeOnStartup="false">
+         <properties>
+            cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
+            cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
+            cache.jdbc.table.drop=${jbosscache-cl-cache.jdbc.table.drop}
+            cache.jdbc.table.primarykey=${jbosscache-cl-cache.jdbc.table.primarykey}
+            cache.jdbc.fqn.column=${jbosscache-cl-cache.jdbc.fqn.column}
+            cache.jdbc.fqn.type=${jbosscache-cl-cache.jdbc.fqn.type}
+            cache.jdbc.node.column=${jbosscache-cl-cache.jdbc.node.column}
+            cache.jdbc.node.type=${jbosscache-cl-cache.jdbc.node.type}
+            cache.jdbc.parent.column=${jbosscache-cl-cache.jdbc.parent.column}
+            cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
+			</properties>
+      </loader>
+   </loaders>
+</jbosscache>

Modified: jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-jcr-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -47,13 +47,20 @@
                      <property name="indexDir" value="target/temp/index/ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>900000</time-out><!-- 15min -->
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="target/temp/lock/ws" />
-                     </properties>
-                  </persister>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -79,13 +86,20 @@
                      <property name="indexDir" value="target/temp/index/ws2" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>900000</time-out><!-- 15min -->
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="target/temp/lock/ws2" />
-                     </properties>
-                  </persister>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
          </workspaces>

Added: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jbosscache-lock.xml	                        (rev 0)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jbosscache-lock.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -0,0 +1,32 @@
+<?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">
+
+   <locking useLockStriping="false" concurrencyLevel="500" lockParentForChildInsertRemove="false"
+      lockAcquisitionTimeout="20000" />
+
+   <loaders passivation="false" shared="true">
+ 	  <!-- All the data of the JCR locks needs to be loaded at startup -->
+ 	  <preload>
+	     <node fqn="/" />
+	  </preload>   
+      <!--
+			For another cache-loader class you should use another template with
+			cache-loader specific parameters
+		-->
+      <loader class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader" async="false" fetchPersistentState="false"
+         ignoreModifications="false" purgeOnStartup="false">
+         <properties>
+            cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
+            cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
+            cache.jdbc.table.drop=${jbosscache-cl-cache.jdbc.table.drop}
+            cache.jdbc.table.primarykey=${jbosscache-cl-cache.jdbc.table.primarykey}
+            cache.jdbc.fqn.column=${jbosscache-cl-cache.jdbc.fqn.column}
+            cache.jdbc.fqn.type=${jbosscache-cl-cache.jdbc.fqn.type}
+            cache.jdbc.node.column=${jbosscache-cl-cache.jdbc.node.column}
+            cache.jdbc.node.type=${jbosscache-cl-cache.jdbc.node.type}
+            cache.jdbc.parent.column=${jbosscache-cl-cache.jdbc.parent.column}
+            cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
+			</properties>
+      </loader>
+   </loaders>
+</jbosscache>

Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-jcr-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -66,13 +66,20 @@
                      <property name="index-dir" value="target/temp/index/db1/ws" />
                   </properties>
                </query-handler>
-               <lock-manager>
-                  <time-out>15m</time-out>
-                  <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
-                     <properties>
-                        <property name="path" value="target/temp/lock" />
-                     </properties>
-                  </persister>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
                </lock-manager>
             </workspace>
 
@@ -107,6 +114,21 @@
                      <property name="index-dir" value="target/temp/index/db1/ws1" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr1" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
 
             <workspace name="ws2">
@@ -140,6 +162,21 @@
                      <property name="index-dir" value="target/temp/index/db1/ws2" />
                   </properties>
                </query-handler>
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr2" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>

Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -711,11 +711,7 @@
           } ],
       "type" : "org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer"
     },
-  "lockManager" : { "persister" : { "parameters" : [ { "name" : "path",
-                "value" : "../temp/lock/system"
-              } ],
-          "type" : "org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"
-        },
+  "lockManager" : 
       "timeout" : 15728640
     },
   "name" : "production",
@@ -846,11 +842,7 @@
           } ],
       "type" : "org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer"
     },
-  "lockManager" : { "persister" : { "parameters" : [ { "name" : "path",
-                "value" : "../temp/lock/system"
-              } ],
-          "type" : "org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"
-        },
+  "lockManager" :
       "timeout" : 15728640
     },
   "name" : "production",
@@ -1617,6 +1609,21 @@
               &lt;property name="index-dir" value="../temp/jcrlucenedb/backup" /&gt;
             &lt;/properties&gt;
           &lt;/query-handler&gt;
+          &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+             &lt;properties&gt;
+                &lt;property name="time-out" value="15m" /&gt;
+                &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+                &lt;property name="jbosscache-shareable" value="true" /&gt;
+             &lt;/properties&gt;
+          &lt;/lock-manager&gt;
         &lt;/workspace&gt;
       &lt;/workspaces&gt;
     &lt;/repository&gt;
@@ -1788,13 +1795,20 @@
                      &lt;property name="index-dir" value="../temp/jcrlucenedb/production" /&gt;
                   &lt;/properties&gt;
                &lt;/query-handler&gt;
-               &lt;lock-manager&gt;
-                  &lt;time-out&gt;15m&lt;/time-out&gt;
-                  &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-                     &lt;properties&gt;
-                        &lt;property name="path" value="../temp/lock/system" /&gt;
-                     &lt;/properties&gt;
-                  &lt;/persister&gt;
+               &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+                  &lt;properties&gt;
+                     &lt;property name="time-out" value="15m" /&gt;
+                     &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+                     &lt;property name="jbosscache-shareable" value="true" /&gt;
+                  &lt;/properties&gt;
                &lt;/lock-manager&gt;
             &lt;/workspace&gt;
 
@@ -1833,6 +1847,21 @@
                      &lt;property name="index-dir" value="../temp/jcrlucenedb/backup" /&gt;
                   &lt;/properties&gt;
                &lt;/query-handler&gt;
+                &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+                  &lt;properties&gt;
+                     &lt;property name="time-out" value="15m" /&gt;
+                     &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+                     &lt;property name="jbosscache-shareable" value="true" /&gt;
+                  &lt;/properties&gt;
+               &lt;/lock-manager&gt;
             &lt;/workspace&gt;
 
             &lt;workspace name="digital-assets"&gt;
@@ -1870,6 +1899,21 @@
                      &lt;property name="index-dir" value="../temp/jcrlucenedb/digital-assets" /&gt;
                   &lt;/properties&gt;
                &lt;/query-handler&gt;
+               &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+                  &lt;properties&gt;
+                     &lt;property name="time-out" value="15m" /&gt;
+                     &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+                     &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+                     &lt;property name="jbosscache-shareable" value="true" /&gt;
+                  &lt;/properties&gt;
+               &lt;/lock-manager&gt;
             &lt;/workspace&gt;
          &lt;/workspaces&gt;
       &lt;/repository&gt;

Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -572,15 +572,23 @@
       &lt;property name="index-dir" value="target/temp/index"/&gt;
     &lt;/properties&gt;
     &lt;/query-handler&gt;
-    &lt;lock-manager&gt;
-    &lt;time-out&gt;15m&lt;/time-out&gt;&lt;!-- 15 min --&gt;
-    &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-      &lt;properties&gt;
-      &lt;property name="path" value="target/temp/lock/ws"/&gt;
-      &lt;/properties&gt;
-    &lt;/persister&gt;
-    &lt;/lock-manager&gt;
+    &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+       &lt;properties&gt;
+          &lt;property name="time-out" value="15m" /&gt;
+          &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+          &lt;property name="jbosscache-shareable" value="true" /&gt;
+       &lt;/properties&gt;
+     &lt;/lock-manager&gt;
   &lt;/workspace&gt;
+
   &lt;workspace name="ws1" auto-init-root-nodetype="nt:unstructured"&gt;
     &lt;container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer"&gt;
     &lt;properties&gt;
@@ -602,14 +610,21 @@
       &lt;property name="index-dir" value="target/temp/index"/&gt;
     &lt;/properties&gt;
     &lt;/query-handler&gt;
-    &lt;lock-manager&gt;
-    &lt;time-out&gt;15m&lt;/time-out&gt;&lt;!-- 15 min --&gt;
-    &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-      &lt;properties&gt;
-      &lt;property name="path" value="target/temp/lock/ws1"/&gt;
-      &lt;/properties&gt;
-    &lt;/persister&gt;
-    &lt;/lock-manager&gt;
+    &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+       &lt;properties&gt;
+          &lt;property name="time-out" value="15m" /&gt;
+          &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+          &lt;property name="jbosscache-shareable" value="true" /&gt;
+       &lt;/properties&gt;
+     &lt;/lock-manager&gt;
   &lt;/workspace&gt;
 &lt;/workspaces&gt;
 </programlisting>
@@ -729,14 +744,21 @@
       &lt;property name="index-dir" value="../temp/index"/&gt;
     &lt;/properties&gt;
     &lt;/query-handler&gt;
-    &lt;lock-manager&gt;
-    &lt;time-out&gt;15m&lt;/time-out&gt;
-    &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-      &lt;properties&gt;
-      &lt;property name="path" value="target/temp/lock/ws"/&gt;
-      &lt;/properties&gt;
-    &lt;/persister&gt;
-    &lt;/lock-manager&gt;
+    &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+       &lt;properties&gt;
+          &lt;property name="time-out" value="15m" /&gt;
+          &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+          &lt;property name="jbosscache-shareable" value="true" /&gt;
+       &lt;/properties&gt;
+     &lt;/lock-manager&gt;
   &lt;/workspace&gt;
   &lt;workspace name="ws1" auto-init-root-nodetype="nt:unstructured"&gt;
     &lt;container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer"&gt;
@@ -754,14 +776,21 @@
       &lt;property name="live-time" value="5m"/&gt;
     &lt;/properties&gt;
     &lt;/cache&gt;
-    &lt;lock-manager&gt;
-    &lt;time-out&gt;15m&lt;/time-out&gt;
-    &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-      &lt;properties&gt;
-      &lt;property name="path" value="target/temp/lock/ws1"/&gt;
-      &lt;/properties&gt;
-    &lt;/persister&gt;
-    &lt;/lock-manager&gt;
+    &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+       &lt;properties&gt;
+          &lt;property name="time-out" value="15m" /&gt;
+          &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+          &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+          &lt;property name="jbosscache-shareable" value="true" /&gt;
+       &lt;/properties&gt;
+     &lt;/lock-manager&gt;
   &lt;/workspace&gt;
 &lt;/workspaces&gt;
 </programlisting>

Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -18,14 +18,10 @@
     <para>Also, LockManager is responsible for removing Locks that live too
     long. This parameter may be configured with "time-out" property.</para>
 
-    <para>JCR provides two basic implementations of LockManager:</para>
+    <para>JCR provides one basic implementations of LockManager:</para>
 
     <itemizedlist>
       <listitem>
-        <para><classname>org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl</classname>;</para>
-      </listitem>
-
-      <listitem>
         <para><classname>org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl</classname>;</para>
       </listitem>
     </itemizedlist>
@@ -51,18 +47,6 @@
   </section>
 
   <section>
-    <title>LockManagerImpl</title>
-
-    <para>LockManagerImpl is a simple implementation of LockManager, and also
-    faster than CacheableLockManager. It stores Lock objects in HashMap and
-    may also persist Locks if LockPersister is configured. LockManagerImpl
-    does not support replication in any way.</para>
-
-    <para>See more about LockManager Configuration at <link
-    linkend="JCR.eXoJCRconfiguration">here</link>.</para>
-  </section>
-
-  <section>
     <title>CacheableLockManagerImpl</title>
 
     <para>CacheableLockManagerImpl stores Lock objects in JBoss-cache, so
@@ -70,10 +54,10 @@
     JBoss-cache has JDBCCacheLoader, so Locks will be stored to the
     database.</para>
 
-    <para>Both of the implementations support to remove Expired Locks.
-    LockRemover separates threads, that periodically ask LockManager to remove
-    Locks that live so long. So, the timeout for LockRemover may be set as
-    follows, the default value is 30m.</para>
+    <para>It supports to remove Expired Locks. LockRemover separates threads,
+    that periodically ask LockManager to remove Locks that live so long. So,
+    the timeout for LockRemover may be set as follows, the default value is
+    30m.</para>
 
     <programlisting language="xml">&lt;properties&gt;
    &lt;property name="time-out" value="10m" /&gt;
@@ -83,150 +67,7 @@
     <section>
       <title>Configuration</title>
 
-      <para>Replication requirements are the same for Cache.</para>
-
-      <para>You can see a full JCR configuration example at <link
-      linkend="JCR.ClusterConfig.JCRExternalConfig">here</link>.</para>
-
-      <para>Common tips:</para>
-
-      <itemizedlist>
-        <listitem>
-          <para><parameter>clusterName</parameter> ("jbosscache-cluster-name")
-          must be unique;</para>
-        </listitem>
-
-        <listitem>
-          <para><parameter>cache.jdbc.table.name</parameter> must be unique
-          per datasource;</para>
-        </listitem>
-
-        <listitem>
-          <para><parameter>cache.jdbc.fqn.type</parameter> and
-          cache.jdbc.node.type must be configured according to used
-          database;</para>
-        </listitem>
-      </itemizedlist>
-
-      <para>There are a few ways to configure CacheableLockManagerImpl, and
-      all of them configure JBoss-cache and JDBCCacheLoader.</para>
-
-      <para>See <ulink
-      url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader">http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader</ulink></para>
-    </section>
-
-    <section>
-      <title>Simple JbossCache Configuration</title>
-
-      <para>The first one is putting JbossCache configuraion file path to
-      CacheableLockManagerImpl.</para>
-
-      <para><note>
-          <para>This configuration is not so good as you think. Because the
-          repository may contain many workspaces, and each workspace must
-          contain LockManager configuration, and LockManager configuration may
-          contain the JbossCache config file. So, the total configuration will
-          grow up. But it is useful if we want to have a single LockManager
-          with a special configuration.</para>
-        </note></para>
-
-      <para>Configuration is as follows:</para>
-
-      <programlisting language="xml">&lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
-   &lt;properties&gt;
-     &lt;property name="time-out" value="15m" /&gt;
-     &lt;property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" /&gt;
-   &lt;/properties&gt;
-&lt;/lock-manager&gt;</programlisting>
-
-      <para><filename>test-jbosscache-lock-config.xml</filename></para>
-
-      <programlisting language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2"&gt;
-
- &lt;locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" /&gt;
-
- &lt;clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_Name"&gt;
-  &lt;stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" /&gt;
-  &lt;jgroupsConfig&gt;
-
-   &lt;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" /&gt;
-   &lt;MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" /&gt;
-
-
-   &lt;MERGE2 max_interval="30000" min_interval="10000" /&gt;
-   &lt;FD_SOCK /&gt;
-   &lt;FD max_tries="5" shun="true" timeout="10000" /&gt;
-   &lt;VERIFY_SUSPECT timeout="1500" /&gt;
-   &lt;pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" /&gt;
-   &lt;UNICAST timeout="300,600,1200,2400,3600" /&gt;
-   &lt;pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" /&gt;
-   &lt;pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" /&gt;
-   &lt;FRAG2 frag_size="60000" /&gt;
-   &lt;pbcast.STREAMING_STATE_TRANSFER /&gt;
-  &lt;pbcast.FLUSH timeout="0" /&gt;
-
-  &lt;/jgroupsConfig
-
-  &lt;sync /&gt;
- &lt;/clustering&gt;
-
- &lt;loaders passivation="false" shared="true"&gt;
-  &lt;preload&gt;
-   &lt;node fqn="/" /&gt;
-  &lt;/preload&gt;
-  &lt;loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false"&gt;
-   &lt;properties&gt;
-    cache.jdbc.table.name=jcrlocks_ws
-    cache.jdbc.table.create=true
-    cache.jdbc.table.drop=false
-    cache.jdbc.table.primarykey=jcrlocks_ws_pk
-    cache.jdbc.fqn.column=fqn
-    cache.jdbc.fqn.type=VARCHAR(512)
-    cache.jdbc.node.column=node
-    cache.jdbc.node.type=&lt;BLOB&gt;  
-    cache.jdbc.parent.column=parent
-    cache.jdbc.datasource=jdbcjcr
-   &lt;/properties&gt;
-  &lt;/loader&gt;
-
- &lt;/loaders&gt;
-
-&lt;/jbosscache&gt;
-</programlisting>
-
-      <para>Configuration requirements:</para>
-
-      <itemizedlist>
-        <listitem>
-          <para>&lt;clustering mode="replication"
-          clusterName="JBoss-Cache-Lock-Cluster_Name"&gt; - the cluster name
-          must be unique;</para>
-        </listitem>
-
-        <listitem>
-          <para><parameter>cache.jdbc.table.name</parameter> must be unique
-          per datasource;</para>
-        </listitem>
-
-        <listitem>
-          <para><parameter>cache.jdbc.node.type</parameter> and
-          <parameter>cache.jdbc.fqn.type</parameter> must be configured
-          according to using the database. See <link endterm="datatypes.title"
-          linkend="datatypes"></link> .</para>
-        </listitem>
-      </itemizedlist>
-    </section>
-
-    <section>
-      <title>Template JBossCache Configuration</title>
-
-      <para>The second one is using the template JBoss-cache configuration for
+      <para>The configuration uses the template JBoss-cache configuration for
       all LockManagers.</para>
 
       <para><citetitle>Lock template configuration</citetitle></para>
@@ -254,7 +95,7 @@
       For another cache-loader class you should use another template with
       cache-loader specific parameters
       -&gt;
-      &lt;loader class="org.jboss.cache.loader.JDBCCacheLoader" async=q"false" fetchPersistentState="false"
+      &lt;loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
          ignoreModifications="false" purgeOnStartup="false"&gt;
          &lt;properties&gt;
             cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
@@ -292,6 +133,7 @@
       &lt;property name="jbosscache-cl-cache.jdbc.node.type" value="AUTO"/&gt;
       &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
       &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+      &lt;property name="jbosscache-shareable" value="true" /&gt;
    &lt;/properties&gt;
 &lt;/lock-manager&gt;</programlisting>
 

Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gtn/how-to-extend-my-gatein-instance.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -1489,13 +1489,20 @@
               &lt;property name="index-dir" value="../temp/jcrlucenedb/sample-ws${container.name.suffix}" /&gt;
             &lt;/properties&gt;
           &lt;/query-handler&gt;
-          &lt;lock-manager&gt;
-            &lt;time-out&gt;15m&lt;/time-out&gt;&lt;!-- 15min --&gt;
-            &lt;persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister"&gt;
-              &lt;properties&gt;
-                &lt;property name="path" value="../temp/lock/sample-ws${container.name.suffix}" /&gt;
-              &lt;/properties&gt;
-            &lt;/persister&gt;
+          &lt;lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl"&gt;
+             &lt;properties&gt;
+                &lt;property name="time-out" value="15m" /&gt;
+                &lt;property name="jbosscache-configuration" value="jbosscache-lock.xml" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.create" value="true" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.drop" value="false" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.node.column" value="node" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" /&gt;
+                &lt;property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" /&gt;
+                &lt;property name="jbosscache-shareable" value="true" /&gt;
+             &lt;/properties&gt;
           &lt;/lock-manager&gt;
         &lt;/workspace&gt;
       &lt;/workspaces&gt;

Added: jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jbosscache-lock.xml	                        (rev 0)
+++ jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jbosscache-lock.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -0,0 +1,32 @@
+<?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">
+
+   <locking useLockStriping="false" concurrencyLevel="500" lockParentForChildInsertRemove="false"
+      lockAcquisitionTimeout="20000" />
+
+   <loaders passivation="false" shared="true">
+ 	  <!-- All the data of the JCR locks needs to be loaded at startup -->
+ 	  <preload>
+	     <node fqn="/" />
+	  </preload>   
+      <!--
+			For another cache-loader class you should use another template with
+			cache-loader specific parameters
+		-->
+      <loader class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader" async="false" fetchPersistentState="false"
+         ignoreModifications="false" purgeOnStartup="false">
+         <properties>
+            cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
+            cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
+            cache.jdbc.table.drop=${jbosscache-cl-cache.jdbc.table.drop}
+            cache.jdbc.table.primarykey=${jbosscache-cl-cache.jdbc.table.primarykey}
+            cache.jdbc.fqn.column=${jbosscache-cl-cache.jdbc.fqn.column}
+            cache.jdbc.fqn.type=${jbosscache-cl-cache.jdbc.fqn.type}
+            cache.jdbc.node.column=${jbosscache-cl-cache.jdbc.node.column}
+            cache.jdbc.node.type=${jbosscache-cl-cache.jdbc.node.type}
+            cache.jdbc.parent.column=${jbosscache-cl-cache.jdbc.parent.column}
+            cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
+			</properties>
+      </loader>
+   </loaders>
+</jbosscache>

Modified: jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml	2011-12-30 13:15:06 UTC (rev 5413)
+++ jcr/branches/1.15.x/exo.jcr.framework.command/src/test/resources/conf/standalone/test-jcr-framework-config.xml	2012-01-03 14:33:36 UTC (rev 5414)
@@ -44,6 +44,21 @@
                      <property name="index-dir" value="target/temp/index" />
                   </properties>
                </query-handler -->
+               <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+                  <properties>
+                     <property name="time-out" value="15m" />
+                     <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock.xml" />
+                     <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
+                     <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+                     <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+                     <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
+                     <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+                     <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+                     <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+                     <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+                     <property name="jbosscache-shareable" value="true" />
+                  </properties>
+               </lock-manager>
             </workspace>
          </workspaces>
       </repository>



More information about the exo-jcr-commits mailing list