[exo-jcr-commits] exo-jcr SVN: r5845 - jcr/branches/1.15.x/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
Mon Mar 12 10:23:30 EDT 2012
Author: areshetnyak
Date: 2012-03-12 10:23:29 -0400 (Mon, 12 Mar 2012)
New Revision: 5845
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-1758 : The problem with eviction and stoping cache on repository stop was fixed.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:20:30 UTC (rev 5844)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:23:29 UTC (rev 5845)
@@ -509,10 +509,18 @@
if (shareable)
{
- // The cache cannot be stopped since it can be shared so we evict the root node instead
- cache.getNode(lockRoot).setResident(false);
- cache.evict(lockRoot, true);
- cache.getRegion(lockRoot, false).processEvictionQueues();
+ // The cache cannot be stopped since it can be shared so we remove the root node instead
+ try
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(true);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
+ cache.removeNode(lockRoot);
+ }
+ finally
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(false);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
+ }
}
try
More information about the exo-jcr-commits
mailing list