tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <>
Subject Re: Lutris_Kelp: [Fwd: What Do We Do With The User's Classpath?]
Date Thu, 20 Jul 2000 04:19:02 GMT
There is one potential gotcha with the below class loading.
If you have X web server virtual hosts, each with Y webapps,
and there are Z cool libraries each user wants available in
their classpath....

You could end up with an instance of the same class being loaded
by each web apps class loader, for a total of X*Y*Z instances of
the class being resident in the JVM.  This could affect scalability
of Tomcat by greatly increasing the stack needed by the JVM.

I don't think the below should be the default behaviour.

Perhaps there could be a parameter for the Context such as
<overload classname="">



"Craig R. McClanahan" wrote:
> I agree that it is backwards from the current Java2 delegation model.
> However,
> consider the following use case:
> * System manager has installed version X of the FooBar JDBC driver
>   as a shared library (on the system class path).
> * A particular application installed in this container installation
> requires
>   some patches that were applied in version Y of the FooBar JDBC
>   driver, so the developer included this jar in WEB-INF/lib.
> * If the traditional delegation model, is followed, none of the version
> Y
>   classes are used (they have the same class names, after all), so the
>   container vendor gets a bug report "your *&*&(*$&*#(& container
>   won't load my classes even though they are in the WEB-INF/lib
> directory!!!"
>   Trying to blame the sysadmin for installing version X as a shared
> library
>   isn't going to get us very far, because she's got existing
> applications
>   that require it, and she sees no need to duplicate it on all the
> existing
>   web-apps just for this new app to work.
> * If the existing Catalina model is followed, this one app uses the
> version Y
>   classes and everyone else continues to rely on the existing shared
>   version X driver installed in the container.  Peaceful coexistence
> reigns,
>   and everyone lives happily ever after.  :-)
> Ultimately, class loading order is an issue that needs to be addressed
> in the
> 2.3 servlet spec, so that all containers implement it the same way.
> Craig
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Glenn Nielsen    | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |

View raw message