Author: manik.surtani(a)jboss.com
Date: 2008-03-12 16:38:28 -0400 (Wed, 12 Mar 2008)
New Revision: 5422
Modified:
core/tags/2.1.0.GA/src/main/java/org/jboss/cache/RegionManager.java
Log:
Don't throw an exception when there is no default region
Modified: core/tags/2.1.0.GA/src/main/java/org/jboss/cache/RegionManager.java
===================================================================
--- core/tags/2.1.0.GA/src/main/java/org/jboss/cache/RegionManager.java 2008-03-12
20:25:38 UTC (rev 5421)
+++ core/tags/2.1.0.GA/src/main/java/org/jboss/cache/RegionManager.java 2008-03-12
20:38:28 UTC (rev 5422)
@@ -422,10 +422,7 @@
}
List<Address> members = cache.getMembers();
-
- // Don't bother trying to fetch state if we are in LOCAL mode
- if (members != null && !members.isEmpty())
- rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
+ rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
}
else if (!BuddyManager.isBackupFqn(fqn))
{
@@ -446,7 +443,11 @@
// need to obtain all necessary locks.
// needs to be a LOCAL call!
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
- subtreeRoot = cache.getRoot().addChild(buddyRoot);
+ // FIXME -- restore the next line and remove the 2 following
+ // when JBCACHE-1265 is fixed
+ //subtreeRoot = cache.getRoot().addChild(buddyRoot);
+ cache.put(buddyRoot, null);
+ subtreeRoot = cache.getRoot().getChild(buddyRoot);
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
}
rpcManager.fetchPartialState(sources, fqn, subtreeRoot.getFqn());