So when Shutting down my tomcat(embedded) server i checked with stack and saw that each time i stopped the server instance some threads are not closing specifically "http-8080-Acceptor-0" and "http-8080-AsyncTimeout". I'm worried that this would cause the server to pergem so can anyone help?
I know it's an old thread, but I've just come to the same problem while embedding tomcat 7.0.4. When sending shutdown signal, or calling server.stop() everything is shut down as expected except the two aforementioned threads. When I shut down my whole java app, they quit as they're daemons.
But I would like to be able to completely shut down embedded tomcat and start another instance without quitting my app.
Is it possible?
In the tomcat changelog I found the following:
fix Make sure acceptor threads are stopped when the connector is stopped. (markt)
fix Make sure async timeout thread is stopped when the connector is stopped. (markt)
Does this mean that this problem is solved? Then why is it happening to me?
Sounds like there may have been a bug, although I think it was the opposite problem to what you're having (shutting down too soon),
You cannot shut down Tomcat while keeping the webapp running because Tomcat is the container for the webapp, and when Tomcat shuts down, the entire Tomcat JVM shuts down.
However, barring Tomcat bugs, the normal shutdown process will shutdown all the Tomcat-spawned threads. So the normal cause of a "hang" on Tomcat shutdown isn't Tomcat, it's failure for one or more of the webapps to shutdown cleanly.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.