tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: How to integrate own ClassLoader
Date Fri, 27 Jul 2001 17:44:42 GMT


On Fri, 27 Jul 2001, Herrmann, Michael wrote:

> Hallo,
> 
> Has anyone a hint if it is possible to replace the ClassLoader
> which Tomcat uses to load servlets. 
> 
> Do to so I also can give Tomcat a ClassLoader which is a
> child loader of the one it used for loading servlets.
> But I don't know how to configure Tomcat that way.
> 

You can do so by modifying Tomcat sources, and making sure that your
custom class loader conforms to the requirements of Tomcat as well as your
own app.  But this is *definitely* not for the faint of heart.  It
requires very intimate knowledge of how class loaders work, and how Tomcat
uses them.

> The reason is that I have code which relies an a specific
> ClassLoader and I like to execute it as a servlet.
> 

You'd probably be better served running your code in a separate JVM (with
its own classloader), and setting up access to it (from your servlets) via
RMI or CORBA.

> Any hints are welcome,
> Michael Herrmann
> 
> 
> 

Craig McClanahan



Mime
View raw message