tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Alexander <>
Subject Re: synchronous stop of tomcat
Date Fri, 07 Sep 2007 11:36:28 GMT

Have been looking at the source, although not documented (for TC5.5), it
seems that it is possible to nest a Listener element
(org.apache.catalina.LifecycleListener) under the Server element as described here
for nesting within Context elements.
This could be used to provide a more elegant way of receiving notification
of when the server has stopped.

However, still not synchronous, looking at JMX for that, seems like I just
need to invoke StandardServer.stop()

Christopher Schultz-2 wrote:
>> Is there a synchronous method for stopping Tomcat, i.e. one that won't
>> return until the ports have been released at least?
> Not that I know of. Lots of folks have posted to the list somewhat
> recently asking basically the same question: how do you know when Tomcat
> has really stopped?
> The best hack I've heard of is to watch the catalina.out log file for
> the magic "Tomcat Stopped" message. Another option would be to actually
> poll the port to see if it's available. They're both pretty ugly options.
> - -chris

View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message