[JBoss JIRA] (ISPN-9561) GlobalConfiguration classloader reference should be strong
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-9561?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-9561:
-------------------------------
Status: Open (was: New)
> GlobalConfiguration classloader reference should be strong
> ----------------------------------------------------------
>
> Key: ISPN-9561
> URL: https://issues.jboss.org/browse/ISPN-9561
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.4.0.CR3
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 9.4.0.Final
>
>
> {{GlobalConfiguration}} uses a {{WeakReference}} to store its classloader, in order to allow {{JCachingProvider}} to use a {{WeakHashMap<ClassLoader, DefaultCacheManager>}}.
> The weak reference works fine when the classloader is the application classloader, but if the application (or the server, in our case) creates a {{ClassLoader}} instance just for the Infinispan configuration, that classloader can be garbage collected while the cache manager is starting. That is exactly what happens during server startup sometimes, making {{GlobalComponentRegistry}} use the TCCL for module initialization and ignoring all the non-core modules.
> We can still use a {{WeakClassLoader}} adapter that wraps a {{WeakReference<ClassLoader>}} for {{JCachingProvider}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 2 months
[JBoss JIRA] (ISPN-9561) GlobalConfiguration classloader reference should be strong
by Dan Berindei (JIRA)
Dan Berindei created ISPN-9561:
----------------------------------
Summary: GlobalConfiguration classloader reference should be strong
Key: ISPN-9561
URL: https://issues.jboss.org/browse/ISPN-9561
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.4.0.CR3
Reporter: Dan Berindei
Assignee: Dan Berindei
Fix For: 9.4.0.Final
{{GlobalConfiguration}} uses a {{WeakReference}} to store its classloader, in order to allow {{JCachingProvider}} to use a {{WeakHashMap<ClassLoader, DefaultCacheManager>}}.
The weak reference works fine when the classloader is the application classloader, but if the application (or the server, in our case) creates a {{ClassLoader}} instance just for the Infinispan configuration, that classloader can be garbage collected while the cache manager is starting. That is exactly what happens during server startup sometimes, making {{GlobalComponentRegistry}} use the TCCL for module initialization and ignoring all the non-core modules.
We can still use a {{WeakClassLoader}} adapter that wraps a {{WeakReference<ClassLoader>}} for {{JCachingProvider}}.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 2 months
[JBoss JIRA] (ISPN-9559) Server <modules> configuration with a single entry can break classloading
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-9559?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-9559:
--------------------------------
Summary: Server <modules> configuration with a single entry can break classloading (was: Server <modules> configuration with a single entry breaks classloading)
> Server <modules> configuration with a single entry can break classloading
> -------------------------------------------------------------------------
>
> Key: ISPN-9559
> URL: https://issues.jboss.org/browse/ISPN-9559
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Embedded Querying, Server
> Affects Versions: 9.2.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 9.4.0.Final
>
>
> There's a bug in CacheContainerConfigurationBuilder introduced by changes for ISPN-7714. This happens only if we have a single module entry specified in the <modules> element of the cache container config or if we have a non-empty 'module' attribute. The classloader of the specified module is used as the global classloader of the cache container. This is almost always wrong. We should instead have an AggregatedClassloader of the user specified classloader in module/modules + the infinispan subsystem classloader. If no module is specified then the infinispan subsystem classloader should be used.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 2 months