tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Williamson <JWilliam...@Lastminute.com>
Subject RE: Using Tomcat 3.2 B2 with VAJava - changes to StopTomcat.java
Date Wed, 26 Jul 2000 15:10:39 GMT


Why do you need a shell script when respawn in your inittab will do the job?



> -----Original Message-----
> From: Tim Kientzle [mailto:kientzle@acm.org]
> Sent: Wednesday, July 26, 2000 1:13 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Using Tomcat 3.2 B2 with VAJava - changes to
> StopTomcat.java
> 
> 
> 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
> 


------------------------------
This e-mail is intended for the named addressee only.  It may contain confidential and/or
privileged information.  If you have received this message in error, please let us know and
then delete this message from your system.  You should not copy the message, use it for any
purpose or disclose its contents to anyone.

Mime
View raw message