[jboss-cvs] JBossAS SVN: r77677 - projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/framework/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Aug 30 02:46:45 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-08-30 02:46:45 -0400 (Sat, 30 Aug 2008)
New Revision: 77677
Modified:
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/framework/server/HAPartitionCacheHandlerImpl.java
Log:
Only release the cache once
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/framework/server/HAPartitionCacheHandlerImpl.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/framework/server/HAPartitionCacheHandlerImpl.java 2008-08-30 06:04:46 UTC (rev 77676)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/framework/server/HAPartitionCacheHandlerImpl.java 2008-08-30 06:46:45 UTC (rev 77677)
@@ -41,7 +41,7 @@
// CacheHandler ------------------------------------------------------------
- public void acquireCache() throws Exception
+ public synchronized void acquireCache() throws Exception
{
if (cache == null)
{
@@ -51,7 +51,7 @@
}
}
- public void startCache() throws Exception
+ public synchronized void startCache() throws Exception
{
if (cache == null)
{
@@ -62,12 +62,15 @@
cache.start();
}
- public void releaseCache() throws Exception
+ public synchronized void releaseCache() throws Exception
{
- validateState();
+ if (cache != null)
+ {
+ validateState();
- cacheManager.releaseCache(cacheConfigName);
- cache = null;
+ cacheManager.releaseCache(cacheConfigName);
+ cache = null;
+ }
}
public String getCacheConfigName()
More information about the jboss-cvs-commits
mailing list