On Thu, 14 Feb 2002, tamir wrote:

> Date: Thu, 14 Feb 2002 10:54:15 +0200
> From: tamir <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: reloading classes - rephrase
>
> Hi there,
> I've a simple question, hope there's a simple answer.
>
> Is it possible to do autoreload for classes not found in WEB-INF/classes or
> WEB-INF/lib
> without restarting tomcat or reloading my web-app classes ?
> (I mean i put my classes OUTSIDE the web-app).
>
> I'm using tomcat 3.3, but can do the advance to 4.02 if needed.
>
> Tnx Alot
> for any information!!!!!
>

The answer is simple:  no.

Java provides no mechanism for unloading a class that has already been
loaded.  The way that reloading is implemented for a webapp is to throw
away the entire class loader used to load that webapp, and starting over
again.  If we did that for shared classes, however, you'd have to restart
*all* webapps because they would all need to be thrown away.

If you want to take advantage of the auto-reload capability to update
classes in a webapp, you *must* put those classes in /WEB-INF/classes, or
in a JAR file in /WEB-INF/lib.

Craig McClanahan



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to