[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Wed Oct 11 09:20:26 EDT 2006
User: msurtani
Date: 06/10/11 09:20:26
Modified: src/org/jboss/cache TreeCache.java
Log:
JBCACHE-761
Revision Changes Path
1.251 +53 -42 JBossCache/src/org/jboss/cache/TreeCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -b -r1.250 -r1.251
--- TreeCache.java 9 Oct 2006 22:26:06 -0000 1.250
+++ TreeCache.java 11 Oct 2006 13:20:26 -0000 1.251
@@ -94,7 +94,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author Brian Stansberry
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Id: TreeCache.java,v 1.250 2006/10/09 22:26:06 bstansberry Exp $
+ * @version $Id: TreeCache.java,v 1.251 2006/10/11 13:20:26 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -744,8 +744,19 @@
}
if (shouldFetchStateOnStartup())
{
+ try
+ {
fetchStateOnStartup();
}
+ catch (Exception e)
+ {
+ // make sure we disconnect from the channel before we throw this exception!
+ // JBCACHE-761
+ channel.disconnect();
+ channel.close();
+ throw e;
+ }
+ }
if (buddyManager != null)
{
buddyManager.init(this);
@@ -1128,15 +1139,15 @@
// Throw the exception on, wrapping if necessary
if (t instanceof RegionNameConflictException)
{
- throw (RegionNameConflictException) t;
+ throw(RegionNameConflictException) t;
}
else if (t instanceof RegionNotEmptyException)
{
- throw (RegionNotEmptyException) t;
+ throw(RegionNotEmptyException) t;
}
else if (t instanceof CacheException)
{
- throw (CacheException) t;
+ throw(CacheException) t;
}
else
{
@@ -1440,7 +1451,7 @@
// Confirm we're not active yet; if we are just invoke the method
switch (region.getStatus())
{
- case (Region.STATUS_ACTIVE):
+ case(Region.STATUS_ACTIVE):
if (log.isTraceEnabled())
{
log.trace("_enqueueMethodCall(): Invoking " + call.getName() +
@@ -1449,7 +1460,7 @@
call.invoke(this);
break;
- case (Region.STATUS_QUEUEING):
+ case(Region.STATUS_QUEUEING):
// Don't bother queueing a getState call
@@ -3438,7 +3449,7 @@
return callResults != null || exists(fqn);
case MethodDeclarations.existsMethod_id:
return (Boolean) callResults;
- default :
+ default:
return false;
}
}
@@ -3454,7 +3465,7 @@
return new HashMap(0);
case MethodDeclarations.getChildrenNamesMethodLocal_id:
return new HashSet(0);
- default :
+ default:
return null;
}
}
@@ -4039,7 +4050,7 @@
{
if (t instanceof CacheException)
{
- throw (CacheException) t;
+ throw(CacheException) t;
}
throw new RuntimeException(t);
}
More information about the jboss-cvs-commits
mailing list