tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babu Wisor <>
Subject Re: how to do auto update/reload of a class?
Date Wed, 31 Jul 2002 17:14:37 GMT
Hi All,
      Thank you, for your response. Do you have any
thoughts as to how to auto re-load the classes, which
have been loaded into JVM using Custom Class loader? I
tried writing custom class loader and loaded all the
classes, but don't know how to re-load the same class,
if it has been modified (re-compiled) without shutting
down JVM, similar to JSP engine, where if we put
updated JSP file, it picks up the new file. 

Note: I learnt that, we need to recreate new class
loader and load all the classes again, but don't know
exactly how to apply that technique in the system. Any
help is greatly appreciated.

Thank you,
--- Ian Darwin <> wrote:
> On July 28, 2002 10:32 pm, you wrote:
> >     Does anyone know, how to do auto update of
> classes
> > into the JVM? I
> > tried to write my own custom class loader, and
> loaded
> > all the classes
> > through it, however if I put new updated class, it
> > won't reload the
> > class again. Have anyone tried this before? Help
> is
> > very much
> > appreciated.
> This better asked on an advanced-java list; not
> tomcat specific.
> For all the cleverness of Java's dynamic loading
> mechanism (ClassLoader,
> Class.forName, newInstance(), etc.), there is no
> published API for unloading or reloading. 
> They just didn't think of it in time, perhaps.
> What I think Tomcat and others do is basically to
> manage the class loader for each Context
> (which has to be separate from the CL for each other
> Context for configuration
> and security reasons anyway) in such a way that you
> can delete
> it (un-reference it) and assign a new one and reload
> the classes
> for the given Context.
> --
> To unsubscribe, e-mail:  
> <>
> For additional commands, e-mail:
> <>

Do You Yahoo!?
Yahoo! Health - Feel better, live better

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message