return delegate.getDistributedCacheManager(localManager);
}
public void cleanup(boolean doRemove)
{
PojoCache cache = delegate.getPojoCache();
if (cache == null)
return;
if (doRemove && CacheStatus.STARTED.equals(cache.getCache().getCacheStatus()))
{
// Try to clean up so we avoid loading sessions
// from storage in later tests
try
{
log.info("Removing /JSESSION from " + cache.getCache().getLocalAddress());
cache.getCache().removeNode(Fqn.fromString("/JSESSION"));
}
catch (Exception e)
{
log.error("Cache " + cache + ": " + e.getMessage(), e);
}
}
try
{
cache.stop();
cache.destroy();
}
catch (Exception e)
{
log.error("Cache " + cache + ": " + e.getMessage(), e);
}