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 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 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: http://www.nabble.com/synchronous-stop-of-tomcat-tf4392954.html#a12553588 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]