commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <>
Subject [jira] [Commented] (POOL-289) Wrong ClassLoader used in BaseGenericObjectPool
Date Tue, 19 May 2015 17:49:00 GMT


Thomas Neidhart commented on POOL-289:

My rationale was that in most cases the DefaultEvictionPolicy will be used (as it is the default
one) which is part of the commons-pool jar. Thus it is most likely that the same classloader
that has loaded the BaseGenericObjectPool will also be able to load the DefaultEvictionPolicy.

In case users select their own eviction policy, I agree with you.

> Wrong ClassLoader used in BaseGenericObjectPool
> -----------------------------------------------
>                 Key: POOL-289
>                 URL:
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: All
>            Reporter: Luke Winkenbach
>            Priority: Critical
>             Fix For: 2.4
>         Attachments: classpath_fix.patch
> BaseGenericObjectPool uses Class.forName to load an EvictionPolicy with the thread context
ClassLoader.  This does not work in OSGi environments.  If the class load fails with the thread
context ClassLoader, the code should attempt to load using the BaseGenericObjectPool class's
ClassLoader as well.  

This message was sent by Atlassian JIRA

View raw message