[exo-jcr-commits] exo-jcr SVN: r1517 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jan 20 11:40:29 EST 2010
Author: skabashnyuk
Date: 2010-01-20 11:40:29 -0500 (Wed, 20 Jan 2010)
New Revision: 1517
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JbossCacheIndexUpdateMonitor.java
Log:
EXOJCR-423 : Catch CacheException
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JbossCacheIndexUpdateMonitor.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JbossCacheIndexUpdateMonitor.java 2010-01-20 16:29:04 UTC (rev 1516)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JbossCacheIndexUpdateMonitor.java 2010-01-20 16:40:29 UTC (rev 1517)
@@ -26,6 +26,7 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
@@ -89,7 +90,7 @@
{
// Currently READ_ONLY is set, so new lists should be fired to multiIndex.
cache.addCacheListener(this);
- }
+ }
}
/**
@@ -110,7 +111,7 @@
cache.addCacheListener(this);
}
}
-
+
/**
* @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#getUpdateInProgress()
*/
@@ -162,11 +163,19 @@
{
throw new IllegalStateException("Unable to set updateInProgress value in IndexerIoMode.READ_ONLY mode");
}
- cache.put(PARAMETER_ROOT, PARAMETER_NAME, new Boolean(updateInProgress));
- for (IndexUpdateMonitorListener listener : listeners)
+ try
{
- listener.onUpdateInProgressChange(updateInProgress);
- }
+ cache.put(PARAMETER_ROOT, PARAMETER_NAME, new Boolean(updateInProgress));
+ for (IndexUpdateMonitorListener listener : listeners)
+ {
+ listener.onUpdateInProgressChange(updateInProgress);
+ }
+
+ }
+ catch (CacheException e)
+ {
+ log.error("Fail to change updateInProgress mode to " + updateInProgress, e);
+ }
}
/**
@@ -187,7 +196,7 @@
{
listeners.add(listener);
}
-
+
/**
* Called when a node of the cache has been modified. It will be used to trigger events
* when the value of <code>updateInProgress</code> has been changed remotely
@@ -206,7 +215,7 @@
}
else
{
- value = data.get(PARAMETER_NAME);
+ value = data.get(PARAMETER_NAME);
}
if (value == null)
{
@@ -217,7 +226,7 @@
for (IndexUpdateMonitorListener listener : listeners)
{
listener.onUpdateInProgressChange(updateInProgress);
- }
+ }
}
}
}
More information about the exo-jcr-commits
mailing list