2014/1/17 Randy Toor <rtoor...@hotmail.com>:
> Hi,
>
> I'm running embedded tomcat (unfortunately still using the deprecated classes 
> and not the newer Tomcat class) and I'm trying to configure my connector at 
> runtime to reject requests.
>
> If I use connector.pause(), any requests just hang until I call 
> connector.resume().
>
> If I use connector.stop(), the first request gets a 503 service unavailable, 
> but any subsequent requests just hang for some reason until I start it again.
>
> Is the latter behaviour expected?  And what would be the best way for me to 
> get the 503 service unavailable (or some error) every time?
>
> Tomcat7, by the way.
>

1. Exactly which one of ~50 different 7.0.x  versions?
2. What connector (BIO, NIO, APR)?

3.  On a stop() I would expect Tomcat to close the sockets.  Clients
that have already connected will have their connection aborted.

Clients that have not connected - the behavior depends on your OS
network settings. The OS may reply that a port is unreachable, or may
just drop the incoming connection.

In either case, when nothing listens on that port, you have nothing
that could serve a "503" response.

Best regards,
Konstantin Kolinko

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

Reply via email to