Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
32964
Description
[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.