I have used the Java Service Wrapper to do this for JBoss (integrated
with Tomcat) on a Tru64 UNIX platform. However, this wrapper works for
both UNIX and Windows NT.
http://wrapper.tanukisoftware.org/doc/english/index.html
Andy
srevilak@(protected):
>>>I'm using Tomcat 4.1.24 et i want after it fails it restarts
>>>automatically to have a high availability.
>
>
>>[Assuming Unix]
>>Way 1 - Set $CATALINA_PID before staarting tomcat. Then have a cron
>>job run occasasionally to look at the value in the file pointed at
>>by $CATALINA_PID. If the process doesn't exist - start tomcat.
>
>
> That's a good idea. Another option (also assuming unix, and the
> willingness to do a little bit of shell scripting) would be to add a
> wrapper around tomcat's scripts.
>
> The general idea is
>
> while true; do
> # using "run" because it blocks
> $CATALINA_HOME/bin/catalina.sh run
> if really_shutting_down; then
> # we're supposed to stop, so exit gracefully
> exit 0
> fi
> done
>
> "really_shutting_down" implies that you'd need a shutdown wrapper with
> some provision for allowing the `loop' script to determine whether a
> shutdown was accidental or intentional. You'd also want to have some
> sort of check in place to prevent an infinite loop if tomcat was
> started with a bad configuration file, or something of that nature.
>
> There are probably other little details to work out, but that's the
> basic idea.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)