commons-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/POOL-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550863#comment-14550863
] 

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: https://issues.apache.org/jira/browse/POOL-289
>             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
(v6.3.4#6332)

Mime
View raw message