use of org.ehcache.CachePersistenceException in project cxf by apache.
the class EHCacheXKMSClientCache method close.
public synchronized void close() {
if (cacheManager.getStatus() == Status.AVAILABLE) {
cacheManager.removeCache(cacheKey);
cacheManager.close();
if (!persistent && cacheManager instanceof PersistentCacheManager) {
try {
((PersistentCacheManager) cacheManager).destroy();
} catch (CachePersistenceException e) {
LOG.debug("Error in shutting down persistent cache", e);
}
// destroy above
if (diskstorePath != null) {
File file = diskstorePath.toFile();
if (file.exists() && file.canWrite()) {
file.delete();
}
}
}
if (bus != null) {
bus.getExtension(BusLifeCycleManager.class).unregisterLifeCycleListener(this);
}
}
}
Aggregations