So there's no way to do this from the Tomcat side?

The process embedding Tomcat knows it's stopping. It does not necessarily even have an ability to connect to the web server(s) that are connecting to it [Apache, IIS, or SJWS, but all via the JK connector]. I therefore want to say "this Tomcat no longer open for business" from the Tomcat side while finishing all requests already in progress.

Also I was somewhat inaccurate/mistaken in my summary of Tomcat 7.0.10 behavior. If you invoke stop() and then destroy() on a connector(), then an exception is logged /but /the destroy() call succeeds. That said, when it succeeds you get a 200 with no content on the next request. The request *after* that is returns a 503 from Apache -- and presumably would have been load balanced to another Tomcat (I only have 1 in my test at the moment). There's still odd behavior for a single request after the stop/destroy().

--
Jess Holle

On 3/9/2011 8:50 AM, Mladen Turk wrote:
On 03/09/2011 03:26 PM, Jess Holle wrote:
P.S. I certainly want to finish processing requests that are already being processed -- I want a graceful shutdown.


It's a two way process.
First in mod_jk mark the node as stopped (best by using status worker).
Then after all sessions times out in Tomcat you can do what ever pleases you.


Regards

Reply via email to