tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Kientzle <kient...@acm.org>
Subject Re: Using Tomcat 3.2 B2 with VAJava - changes to StopTomcat.java
Date Wed, 26 Jul 2000 00:12:48 GMT
This is something I've been wondering about.  I've been
toying with the idea of adding a shell script that simply
starts Tomcat, waits for it to die, restarts it,... in
an endless loop.  This is mostly a reliability issue, having
Tomcat automatically restart in the event of a problem.

It had occurred to me that this might allow for a servlet
to automatically restart Tomcat.  Can a servlet running
within Tomcat invoke this?  If so, that would be very useful;
I'd like for an administrative servlet to allow a webmaster
to completely restart Tomcat, in the process flushing any stale
cached data, etc.

				- Tim


Dave Harms wrote:
> 
> If you're following Sheldon Wosnick's much-appreciated tutorial on
> using VAJava with Tomcat, you'll need to make a couple of changes to
> StopTomcat.java for proper shutdown. Change
> 
>  Class aClass = Class.forName("org.apache.tomcat.shell.Shutdown");
> 
> to
> 
>  Class aClass = Class.forName("org.apache.tomcat.startup.Tomcat");
> 
> And change
> 
>  Object[] arguments = new Object[] {new String[] {}};
> 
> to
> 
>  Object[] arguments = new Object[] {new String[] {"-stop"}};
> 
> That will pass the -stop parameter to org.apache.tomcat.startup.Tomcat,
> which now handles startup and shutdown.
> 
> FYI.
> 
> Dave
> 
> Dave Harms
> jdev@clarionmag.com

Mime
View raw message