tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beton, Richard" <richard.be...@roke.co.uk>
Subject Re: tomcat restart?
Date Wed, 11 May 2005 08:37:22 GMT
Patrick Thomas wrote:

>Actually, I believe it might be possible. Ugly, but possible. Using
>Runtime.getRuntime() to get the current runtime, you can then actually
>make a call to a shell command. You could call a batch file that would
>shut down the server and then restart it. What I don't know is if the
>newly exec'd process gets taken down with tomcat... if so, you could
>have the shell program that you call start a new process that would
>not be associated with the existing one (in windows you can use the
>command 'start' in a batch file to start a separate process... someone
>else will no doubt supply the *nix equivalent).
>  
>



Thanks for the help.  I'm running Tomcat as an init.d System V service 
on Linux.  This means I can't write a simple script to restart it - the 
restart has to be done as root (although Tomcat runs as a user called 
tomcat).  My startup script already does the work of moving jarfiles and 
our native library to their correct locations.

So I've decided that automatic restart is in the 'too hard' category: 
instead I'll include in the webapp the means for an administrator to 
determine whether the deployment is up to date (fresh jarfiles in the 
shared/lib folder etc).  It'll then be a manual administration task to 
restart Tomcat when required.  It won't happen often.

Rick






-- 

Visit our website at www.roke.co.uk

Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK.

The information contained in this e-mail and any attachments is proprietary to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message