You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Blevins <da...@gmail.com> on 2013/08/18 05:06:59 UTC

Loading drivers from outside server lib/

Hi All!

Whipped up a short little patch to allow for JDBC drivers and interceptors to be loaded from the thread context class loader as well as the traditional way using effectively the server/lib/ based classloader.

 - https://issues.apache.org/bugzilla/show_bug.cgi?id=55444

We were using Commons DBCP which did allow for the driver classloader to be set explicitly.  I was tempted to add similar setDriverClassLoader(ClassLoader) and getDriverClassLoader() methods to the PoolConfiguration interface, but it looked like the values there have been intentionally kept to primitive types.  Wasn't sure that would be a welcome change.

Happy to redo this in whichever way might be best.


-David


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


Re: Loading drivers from outside server lib/

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

I proposed it too some times ago (
http://tomcat.10.x6.nabble.com/pooledconnection-amp-tccl-td4985466.html).

Side note: we made it working in tomee since several versions using
resources.xml but the point is because of the way jdbc drivers work you
can't really prevent mem leaks when a server uses redeployment
Le 18 août 2013 05:07, "David Blevins" <da...@gmail.com> a écrit :

> Hi All!
>
> Whipped up a short little patch to allow for JDBC drivers and interceptors
> to be loaded from the thread context class loader as well as the
> traditional way using effectively the server/lib/ based classloader.
>
>  - https://issues.apache.org/bugzilla/show_bug.cgi?id=55444
>
> We were using Commons DBCP which did allow for the driver classloader to
> be set explicitly.  I was tempted to add similar
> setDriverClassLoader(ClassLoader) and getDriverClassLoader() methods to the
> PoolConfiguration interface, but it looked like the values there have been
> intentionally kept to primitive types.  Wasn't sure that would be a welcome
> change.
>
> Happy to redo this in whichever way might be best.
>
>
> -David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>