----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
> > > I want a servlet to reload itself. If i call "destroy()", will jserv
> > > then reload or re "init()" the servlet? What is the best way to do
> > > this?
> >
> > <http://java.apache.org/faq/fom-serve/cache/29.html>
> >
> > if you "touch" any class in your repositories= path, then it
> will cause a
> > reload.
>
> Jon,
>
> I know, but I want to do this from inside the servlet and was
> wondering if there was a method call which could do this. Doing a
> system call (Runtime.exec()) to run touch on the .class files of the
> servlet is less than elegant, as well as having to keep around this
> location.
>
> I am still interested in the original question about what happens when
> I call destroy() etc.
>
> thanks,
>
> glen :-)
Calling destroy() from within your own servlet code will achieve nothing but
grief -- it certainly won't cause JServ (or any other servlet engine) to
reload
you servlet.
So, why would you want your servlet to "reload" itself? Is it to
reinitialize
some resources that you use? If so, why both reloading -- just put your
initialization
in a separate, sychronized method, and call that when you want to "reload".
The effect would be identical.
- Fernando
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]