It is 7.0.32.

To be honest, I'm not sure which connector it is.  The code extends 
org.apache.catalina.connector.Connector, sets up HTTP settings, and adds it to 
the EmbeddedTomcat container.

Using netstat I'm noticing that with either a pause() or a stop() the port is 
still being listened on.  It's only when I shut down completely that it stops.  
I would prefer it to stop listening, at least that way I can the OS can return 
me an error or drop the connection, but instead it seems to accept requests and 
hold on to them until resume() or start() is called before processing.  Is this 
expected?

Thanks!

> Date: Sun, 19 Jan 2014 19:38:40 +0400
> Subject: Re: Stopping/pausing a Connector
> From: knst.koli...@gmail.com
> To: users@tomcat.apache.org
> 
> 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