public void stop() { //FIXME : this is a hack to remove exception on shutdown, when releasing the cache to the manager jBossCacheService.cacheConfigName_ = null; if (sipCacheListener_ != null) { jBossCacheService.getCache().removeCacheListener(sipCacheListener_); if (sipPassivationListener_ != null) { jBossCacheService.getCache().removeCacheListener( sipPassivationListener_); } } }
@Override public void destroy() throws CacheException { getCacheInstance().removeCacheListener(this); super.destroy(); localCache.clear(); }
@Override public void destroy() throws CacheException { localCache.clear(); getCacheInstance().removeCacheListener(this); super.destroy(); }
@Override public void destroy() throws CacheException { getCacheInstance().removeCacheListener(this); super.destroy(); localCache.clear(); }
@Override public void destroy() throws CacheException { localCache.clear(); getCacheInstance().removeCacheListener(this); super.destroy(); }
public void destroy() throws CacheException { try { // NOTE : this is being used from the process of shutting down a // SessionFactory. Specific things to consider: // (1) this clearing of the region should not propagate to // other nodes on the cluster (if any); this is the // cache-mode-local option bit... // (2) really just trying a best effort to cleanup after // ourselves; lock failures, etc are not critical here; // this is the fail-silently option bit... Option option = new Option(); option.setCacheModeLocal(true); option.setFailSilently(true); if (optimistic) { option.setDataVersion(NonLockingDataVersion.INSTANCE); } jbcCache.getInvocationContext().setOptionOverrides(option); jbcCache.removeNode(regionFqn); deactivateLocalNode(); } catch (Exception e) { throw new CacheException(e); } finally { jbcCache.removeCacheListener(this); } }