You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Juan Ignacio Garzón <ju...@gmail.com> on 2007/07/17 22:09:34 UTC
Classloader question
Hi,
I'm working with Tomcat 4.1.
I have a library that has to be shared between all the applications,
but it has singletons that should have one instance per application.
In a normal situation, each application could have the .jar in it's
WEB-INF/lib directory, but there is a requirement saying that this is
not possible.
So, is there a way for making a .jar available to all the
applications, but using each application's class loader, so that
static fields are not shared between applications?
Thanks in advance!
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Classloader question
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Juan,
Juan Ignacio Garzón wrote:
> Is there a way for making a .jar available to all the
> applications, but using each application's class loader, so that
> static fields are not shared between applications?
No. You will have to put the JAR file into each webapp's WEB-INF/lib
directory.
You could write your own classloader, but that would be a real mess.
-chris