I want to stop all incoming requests at a given point. I am running Tomcat within a larger process and I want to stop accepting new requests -- ideally in such a way that those requests are immediately routed to another Tomcat by mod_jk.

In Tomcat 6.0.x, I tried to do this by invoking the stop() operation on the Connector MBeans. This almost works -- it allows one more request through (and maybe more in cases, I'm not sure, but always at least one) and then stops accepting additional requests. I then tried destroy(). This works. Both operations log an error stating "Coyote connector has not been started", which I am currently ignoring.

In Tomcat 7.0.10, stop() exhibits the same issue -- it lets at least one request through after the connector is supposedly stopped. It does not, however, log an error. destroy(), however, no longer works at all -- producing a lifecycle exception.

It seems like there's at least one bug here -- unless there is no intent to allow one to reliably stop accepting connections on a given connector.

Stopping the Engine or Service MBean instead results in a 404, which is not really what I want -- as I want mod_jk load balancing to go elsewhere, not return a 404.

--
Jess Holle


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to