MultiManager did not release instances
Status: Beta
Brought to you by:
pents90
On MultiCacheManager.shutDown() every manager get
closed but then the instances map remain full and on a
successive cacheFactory.createCache() I get a null cache.
On Hibernate under JBoss this lead to a NPE when hot
deploy of application bring to a call to
cacheFactory.createCache().
I suggest the removing of instance in MultiCacheManager
during shutdown:
/\* \* Shutdown all the managers in the list \* @author Rajeev Kaul \*/ public static synchronized void shutDown\(\) \{ if \(\!instances.isEmpty\(\)\) \{ Set keys = instances.keySet\(\); Iterator iter = keys.iterator\(\); String key; MultiCacheManager manager; while \(iter.hasNext\(\)\) \{ key = \(String\) iter.next\(\); manager = \(MultiCacheManager\) instances.get\(key\); manager.close\(\);
+ iter.remove();
}
}
}