Author: nfilotto
Date: 2010-02-04 18:10:16 -0500 (Thu, 04 Feb 2010)
New Revision: 1689
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-467: We now use a pre and post cache loader, to avoid useless database accesses
which cause TimeoutException
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-04
19:30:30 UTC (rev 1688)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-04
23:10:16 UTC (rev 1689)
@@ -54,7 +54,10 @@
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.lock.TimeoutException;
import org.picocontainer.Startable;
import java.io.Serializable;
@@ -250,6 +253,8 @@
cache = factory.createCache(config.getLockManager());
+ // Add the cache loader needed to prevent TimeoutException
+ addCacheLoaders();
cache.create();
cache.start();
@@ -264,6 +269,52 @@
}
}
+ /**
+ * This methods adds programmatically the required {@link CacheLoader} needed to
prevent
+ * any {@link TimeoutException}
+ */
+ private void addCacheLoaders()
+ {
+ CacheLoaderConfig config = cache.getConfiguration().getCacheLoaderConfig();
+ List<IndividualCacheLoaderConfig> oldConfigs;
+ if (config == null || (oldConfigs = config.getIndividualCacheLoaderConfigs()) ==
null || oldConfigs.isEmpty())
+ {
+ if (log.isInfoEnabled())
+ {
+ log.info("No cache loader has been defined, thus no pre and post cache
loader will be added");
+ }
+ return;
+ }
+ PreNPostCacheLoader preCL = new PreNPostCacheLoader(true);
+ // create CacheLoaderConfig
+ IndividualCacheLoaderConfig preCLConfig = new IndividualCacheLoaderConfig();
+ // set CacheLoader
+ preCLConfig.setCacheLoader(preCL);
+ // set parameters
+ preCLConfig.setFetchPersistentState(false);
+ preCLConfig.setAsync(false);
+ preCLConfig.setIgnoreModifications(true);
+ preCLConfig.setPurgeOnStartup(false);
+ PreNPostCacheLoader postCL = new PreNPostCacheLoader(false);
+ // create CacheLoaderConfig
+ IndividualCacheLoaderConfig postCLConfig = new IndividualCacheLoaderConfig();
+ // set CacheLoader
+ postCLConfig.setCacheLoader(postCL);
+ // set parameters
+ postCLConfig.setFetchPersistentState(false);
+ postCLConfig.setAsync(false);
+ postCLConfig.setIgnoreModifications(true);
+ postCLConfig.setPurgeOnStartup(false);
+ List<IndividualCacheLoaderConfig> newConfigs = new
ArrayList<IndividualCacheLoaderConfig>(oldConfigs);
+ newConfigs.add(0, preCLConfig);
+ newConfigs.add(postCLConfig);
+ config.setIndividualCacheLoaderConfigs(newConfigs);
+ if (log.isInfoEnabled())
+ {
+ log.info("The pre and post cache loaders have been added");
+ }
+ }
+
/*
* (non-Javadoc)
* @see
@@ -342,7 +393,7 @@
{
public Boolean execute(String nodeId)
{
- if (/*pendingLocks.containsKey(nodeId) ||
*/cache.getRoot().hasChild(makeLockFqn(nodeId)))
+ if (/*pendingLocks.containsKey(nodeId) || */cache.get(makeLockFqn(nodeId),
LOCK_DATA) != null)
{
return true;
}
@@ -704,7 +755,7 @@
{
public Boolean execute(String nodeId) throws LockException
{
- return cache.getRoot().hasChild(makeLockFqn(nodeId));
+ return cache.get(makeLockFqn(nodeId), LOCK_DATA) != null;
}
};
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/PreNPostCacheLoader.java 2010-02-04
23:10:16 UTC (rev 1689)
@@ -0,0 +1,287 @@
+/*
+ * 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.jbosscache;
+
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.Modification;
+import org.jboss.cache.NodeSPI;
+import org.jboss.cache.RegionManager;
+import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.lock.TimeoutException;
+
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * This {@link CacheLoader} is used to encapsulate the {@link CacheLoader} used to
persist the data of the Locks.
+ * This is used to prevent {@link TimeoutException} that occur when several threads try
to access the same data
+ * at the same time and the data is missing in the local cache which is the case most of
the time, since no data
+ * means that the node is not locked. This {@link CacheLoader} will then check if some
data exists before calling
+ * the main {@link CacheLoader} that is used to persist the data and if no data exist
either in the local cache and
+ * the main {@link CacheLoader}, this {@link CacheLoader} will load dummy data to
indicate that the data has already
+ * been loaded.
+ *
+ * Created by The eXo Platform SAS
+ * Author : Nicolas Filotto
+ * nicolas.filotto(a)exoplatform.com
+ * 4 f�vr. 2010
+ */
+@SuppressWarnings("unchecked")
+public class PreNPostCacheLoader implements CacheLoader
+{
+ /**
+ * The configuration of the current cache loader
+ */
+ private IndividualCacheLoaderConfig config;
+
+ /**
+ * Indicates if this cache loader is called before the main cache loader of after the
main cache loader
+ */
+ private boolean preCacheLoader;
+
+ /**
+ * The related cache
+ */
+ private CacheSPI cache;
+
+ /**
+ * The default constructor
+ * @param preCacheLoader indicates if this cache loader must be added before the main
cache loader or after it.
+ * <code>true</code> means that it has been added before the main cache
loader.
+ */
+ public PreNPostCacheLoader(boolean preCacheLoader)
+ {
+ this.preCacheLoader = preCacheLoader;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#commit(java.lang.Object)
+ */
+ public void commit(Object tx) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#exists(org.jboss.cache.Fqn)
+ */
+ public boolean exists(Fqn name) throws Exception
+ {
+ if (preCacheLoader)
+ {
+ // Before calling the main cache loader we first check if the data exists in the
local cache
+ // in order to prevent multiple call to the cache store
+ return cache.peek(name, false) != null;
+ }
+ else
+ {
+ // The main cache loader has been called but no data could find into the cache
store
+ // so to prevent a multiple useless call, we return an empty map to enforce JBC
to create
+ // a node that will indicate that the data has already been loaded but no data
was found
+ return true;
+ }
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#get(org.jboss.cache.Fqn)
+ */
+ public Map<Object, Object> get(Fqn name) throws Exception
+ {
+ if (preCacheLoader)
+ {
+ // Before calling the main cache loader we first check if the data exists in the
local cache
+ // in order to prevent multiple call to the cache store
+ NodeSPI<Object, Object> node = cache.peek(name, false);
+ if (node != null)
+ {
+ // The node exists which means that the data has already been loaded, so we
return the data
+ // already loaded
+ return node.getDataDirect();
+ }
+ else
+ {
+ // No data has been loaded, so we can call the main cache loader
+ return null;
+ }
+ }
+ else
+ {
+ // The main cache loader has been called but no data could find into the cache
store
+ // so to prevent a multiple useless call, we return an empty map to enforce JBC
to create
+ // a node that will indicate that the data has already been loaded but no data
was found
+ return Collections.emptyMap();
+ }
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#getChildrenNames(org.jboss.cache.Fqn)
+ */
+ public Set<?> getChildrenNames(Fqn fqn) throws Exception
+ {
+ return null;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#getConfig()
+ */
+ public IndividualCacheLoaderConfig getConfig()
+ {
+ return config;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#loadEntireState(java.io.ObjectOutputStream)
+ */
+ public void loadEntireState(ObjectOutputStream os) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#loadState(org.jboss.cache.Fqn,
java.io.ObjectOutputStream)
+ */
+ public void loadState(Fqn subtree, ObjectOutputStream os) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#prepare(java.lang.Object, java.util.List,
boolean)
+ */
+ public void prepare(Object tx, List<Modification> modifications, boolean
onePhase) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(java.util.List)
+ */
+ public void put(List<Modification> modifications) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
+ */
+ public void put(Fqn name, Map<Object, Object> attributes) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#put(org.jboss.cache.Fqn, java.lang.Object,
java.lang.Object)
+ */
+ public Object put(Fqn name, Object key, Object value) throws Exception
+ {
+ return null;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn)
+ */
+ public void remove(Fqn fqn) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn,
java.lang.Object)
+ */
+ public Object remove(Fqn fqn, Object key) throws Exception
+ {
+ return null;
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#removeData(org.jboss.cache.Fqn)
+ */
+ public void removeData(Fqn fqn) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#rollback(java.lang.Object)
+ */
+ public void rollback(Object tx)
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#setCache(org.jboss.cache.CacheSPI)
+ */
+ public void setCache(CacheSPI cache)
+ {
+ this.cache = cache;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig)
+ */
+ public void setConfig(IndividualCacheLoaderConfig config)
+ {
+ this.config = config;
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#setRegionManager(org.jboss.cache.RegionManager)
+ */
+ public void setRegionManager(RegionManager manager)
+ {
+ }
+
+ /**
+ * @see
org.jboss.cache.loader.CacheLoader#storeEntireState(java.io.ObjectInputStream)
+ */
+ public void storeEntireState(ObjectInputStream is) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.loader.CacheLoader#storeState(org.jboss.cache.Fqn,
java.io.ObjectInputStream)
+ */
+ public void storeState(Fqn subtree, ObjectInputStream is) throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#create()
+ */
+ public void create() throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#destroy()
+ */
+ public void destroy()
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#start()
+ */
+ public void start() throws Exception
+ {
+ }
+
+ /**
+ * @see org.jboss.cache.Lifecycle#stop()
+ */
+ public void stop()
+ {
+ }
+}
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml 2010-02-04
19:30:30 UTC (rev 1688)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jbosscache-lock.xml 2010-02-04
23:10:16 UTC (rev 1689)
@@ -11,9 +11,6 @@
</clustering>
<loaders passivation="false" shared="true">
- <preload>
- <node fqn="/" />
- </preload>
<!--
For another cache-loader class you should use another template with
cache-loader specific parameters
@@ -33,7 +30,13 @@
cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
</properties>
</loader>
-
</loaders>
-
+ <!-- Eviction configuration -->
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="120000" />
+ </default>
+ </eviction>
</jbosscache>
Added:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml
(rev 0)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lock.xml 2010-02-04
23:10:16 UTC (rev 1689)
@@ -0,0 +1,36 @@
+<?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="50000"
lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
+
+ <loaders passivation="false" shared="true">
+ <!--
+ For another cache-loader class you should use another template with
+ cache-loader specific parameters
+ -->
+ <loader class="org.jboss.cache.loader.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>
+ <!-- Eviction configuration -->
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="120000" />
+ </default>
+ </eviction>
+</jbosscache>
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-04
19:30:30 UTC (rev 1688)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-04
23:10:16 UTC (rev 1689)
@@ -77,11 +77,22 @@
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1_ws" />
+ <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_db1_ws_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
<workspace name="ws1">
@@ -120,11 +131,22 @@
<property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1_ws1" />
+ <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_db1_ws1_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr1" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
<workspace name="ws2" lazy-read-threshold="1">
@@ -163,11 +185,22 @@
<property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1_ws2" />
+ <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_db1_ws2_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr2" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
<workspace name="ws3">
@@ -237,11 +270,23 @@
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
- <properties>
- <property name="time-out" value="15m"
/>
- </properties>
- </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_db1_ws3" />
+ <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_db1_ws3_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property
name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr3" />
+ </properties>
+ </lock-manager>
+
</workspace>
</workspaces>
</repository>
@@ -297,11 +342,22 @@
<property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1tck_ws" />
+ <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_db1tck_ws_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcrtck" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
<workspace name="ws1">
@@ -346,11 +402,22 @@
<property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1tck_ws1" />
+ <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_db1tck_ws1_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr1tck" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
<workspace name="ws2">
@@ -398,11 +465,22 @@
<property name="extractorTimeout"
value="10"/>
</properties>
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl">
+ <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_db1tck_ws2" />
+ <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_db1tck_ws2_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="VARCHAR(512)" />
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="OBJECT" />
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr2tck" />
</properties>
- </lock-manager>
+ </lock-manager>
</workspace>
</workspaces>
</repository>