[infinispan-issues] [JBoss JIRA] (ISPN-9917) JCachingProvider should not use weak ClassLoader references
Dan Berindei (Jira)
issues at jboss.org
Fri Feb 1 04:44:00 EST 2019
Dan Berindei created ISPN-9917:
----------------------------------
Summary: JCachingProvider should not use weak ClassLoader references
Key: ISPN-9917
URL: https://issues.jboss.org/browse/ISPN-9917
Project: Infinispan
Issue Type: Bug
Components: JCache
Affects Versions: 9.4.6.Final, 10.0.0.Alpha3
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 10.0.0.Beta1, 9.4.7.Final
The idea behind {{WeakClassLoader}} is that we want users to be able to use {{Caching.getCachingProvider().getCacheManager()}} and not worry about closing the cache manager: instead Infinispan will close the manager when there are no more references to the provided {{ClassLoader}}.
In order to close the manager automatically, {{AbstractJCachingProvider}} maintains a {{WeakHashMap}} of classloaders to managers, and if the cache manager had a strong reference to the classloader, the {{WeakHashMap}} entry would never be collected.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list