Shutdown command hangs with primrose  
guest Fri Oct 17 21:02:38 BST 2008
 
I am facing a small issue here,
when I am using the shutdown command for shutting down tomcat, it says stopping but hangs midway. However when I remove the primrose configurations from the server.xml, and run the shutdown command the tomcat shuts down gracefully.
Any thougts or ideas as to why tomcat behaves this way with primrose?

Thanks.
 
guest Mon Oct 20 16:09:47 BST 2008
 
I figured it out, I missed putting the following entry in the web.xml

PoolDestructorServlet
uk.org.primrose.PoolDestructorServlet
1

sedj Mon Oct 20 21:22:47 BST 2008
 
Hi, yeah its a problem with Tomcat IMO.
Its because primrose has some threads running which primrose doesn't know to shut down until the container tells it to (ie via the servlet destroy() method).

There is an automatic JVM shutdown hook in primrose, but its not called when tomcat stops unfortunately, hence the elaborate method to use the servlet. If Tomcat called System.exit() when its main thread stopped, then the JVM shutdown hook would be called, and all would be well !