tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Bug in Tomcat AJP Connector?
Date Thu, 05 Apr 2012 22:44:44 GMT
2012/4/6 Ofer Israeli <oferi@checkpoint.com>:
> Hi Konstantin,
>
> I agree regarding the OOM bringing TC to a state where it must be restored, but my point
remains: if there is code that handles catching this exception and terminating the thread,
why not terminate gracefully by closing the listening socket before killing the thread?
>

1. In theory one can configure several acceptor threads. Though it is
not recommended.
So one has to check the count before closing the socket.

2. The socket will be closed when Tomcat shuts down.
Just closing the socket - what will it improve?

Anyway you will need to shutdown this Tomcat instance before you can
start the second one, because you'll need to free the shutdown port
etc.

> if there is code that handles catching this exception and terminating the thread

3. There is no such special code. The thread terminates by itself,
because its run() throws an exception and thus finishes execution.

There is ThreadGroup.uncaughtException() method in JRE which by
default prints the exception to stdout.


If you consider to propose a patch - feel free to file an enhancement
request in Bugzilla and attach it.

Best regards,
Konstantin Kolinko

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


Mime
View raw message