[exo-jcr-commits] exo-jcr SVN: r1497 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jan 20 05:12:02 EST 2010
Author: sergiykarpenko
Date: 2010-01-20 05:12:01 -0500 (Wed, 20 Jan 2010)
New Revision: 1497
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
Log:
EXOJCR-418: InitialContextInitializer recall moved to start()
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-20 09:31:06 UTC (rev 1496)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-20 10:12:01 UTC (rev 1497)
@@ -140,6 +140,11 @@
private final Map<String, LockData> pendingLocks;
/**
+ * Context recall is a workaround of JDBCCacheLoader starting.
+ */
+ private final InitialContextInitializer context;
+
+ /**
* Run time lock time out.
*/
private long lockTimeOut;
@@ -188,6 +193,7 @@
pendingLocks = new HashMap<String, LockData>();
sessionLockManagers = new HashMap<String, CacheableSessionLockManager>();
+ this.context = context;
dataManager.addItemPersistenceListener(this);
@@ -201,10 +207,6 @@
? config.getLockManager().getParameterValue(JBOSSCACCHE_CONFIG) : config.getLockManager()
.getCacheConfig();
CacheFactory<Serializable, Object> factory = new DefaultCacheFactory<Serializable, Object>();
-
- // Context recall is a workaround of JDBCCacheLoader starting.
- context.recall();
-
cache = factory.createCache(pathToConfig, false);
cache.create();
}
@@ -457,6 +459,8 @@
public void start()
{
cache.start();
+ // Context recall is a workaround of JDBCCacheLoader starting.
+ context.recall();
lockRoot = cache.getRoot().addChild(Fqn.fromString(LOCKS));
lockRoot.setResident(true);
lockRemover = new LockRemover(this);
@@ -716,7 +720,7 @@
dataManager.save(new TransactionChangesLog(changesLog));
}
- catch (JCRInvalidItemStateException e)
+ catch (JCRInvalidItemStateException e)
{
//TODO EXOJCR-412, should be refactored in future.
//Skip property not found in DB, because that lock property was removed in other node of cluster.
@@ -724,7 +728,7 @@
{
log.debug("The propperty was removed in other node of cluster.", e);
}
-
+
}
catch (RepositoryException e)
{
More information about the exo-jcr-commits
mailing list