commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DBCP-145) [dbcp] PoolingDriver.getConnectionPool() should use contextClassLoader
Date Mon, 10 Jul 2006 05:18:30 GMT
     [ http://issues.apache.org/jira/browse/DBCP-145?page=all ]

Phil Steitz updated DBCP-145:
-----------------------------

    Bugzilla Id:   (was: 32964)
    Fix Version: 1.3

> [dbcp] PoolingDriver.getConnectionPool() should use contextClassLoader
> ----------------------------------------------------------------------
>
>          Key: DBCP-145
>          URL: http://issues.apache.org/jira/browse/DBCP-145
>      Project: Commons Dbcp
>         Type: Improvement

>  Environment: Operating System: Windows XP
> Platform: PC
>     Reporter: Jörg von Frantzius
>     Priority: Minor
>      Fix For: 1.3

>
> [commons-dbcp.jar 1.2.1]
> In PoolingDriver.getConnectionPool(String), the following is used:
> InputStream in = this.getClass().getResourceAsStream(String.valueOf(name) +
> ".jocl");
> In certain environments, this will fail to find the resource. In particular the
> Eclipse Rich Client Platform, i.e. Eclipse's Plugin classloader architecture,
> prevent this from working, but this might apply for some application servers as
> well. It is generally common (and recommandable) to use the current Thread's
> contextClassLoader instead, e.g. by following the above line with:
> if (in==null) {
>    in =
> Thread.currentThread().getContextClassLoader().getResourceAsStream(String.valueOf(name)
> + ".jocl");
> }
> Thanks,
> Jörg.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message