Author: manik.surtani(a)jboss.com
Date: 2008-06-04 13:07:48 -0400 (Wed, 04 Jun 2008)
New Revision: 5953
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java
Log:
JBCACHE-1360: ClusteredCacheLoader.getChildrenNames() returns a null if it cannot connect
to the cluster
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-06-04
17:05:59 UTC (rev 5952)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-06-04
17:07:48 UTC (rev 5953)
@@ -328,7 +328,17 @@
if (trace) log.trace("Children already loaded!");
return;
}
- Set childrenNames = loader.getChildrenNames(fqn);
+ Set childrenNames;
+ try
+ {
+ childrenNames = loader.getChildrenNames(fqn);
+ }
+ catch (Exception e)
+ {
+ if (log.isInfoEnabled()) log.info("Cache loader was unable to load
state", e);
+ // return!
+ return;
+ }
if (trace)
{
Modified: core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java 2008-06-04
17:05:59 UTC (rev 5952)
+++ core/trunk/src/main/java/org/jboss/cache/loader/ClusteredCacheLoader.java 2008-06-04
17:07:48 UTC (rev 5953)
@@ -14,6 +14,7 @@
import org.jboss.cache.Modification;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.RegionManager;
+import org.jboss.cache.ReplicationException;
import org.jboss.cache.commands.DataCommand;
import org.jboss.cache.commands.read.ExistsCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
@@ -122,7 +123,7 @@
{
if (log.isInfoEnabled())
log.info("No replies to call " + dataCommand + ". Perhaps
we're alone in the cluster?");
- return null;
+ throw new ReplicationException("No replies to call " + dataCommand +
". Perhaps we're alone in the cluster?");
}
else
{
Show replies by date