When tomcat is installed with ports/www/jakarta-tomcat4 port, it uses daemonctl.c to manage execution of JVM. When daemonctl is used to stop currently executing tomcat, it does this by issuing kill -SIGTERM to tomcat process. This causes tomcat to stop immediately, without normal shutdown activities, like unloading servlets etc. Fix: The shutdown should be handled by issuing command "java -Dcatalina.home=path-to-catalina-home -jar bin/bootstrap.jar stop". This causes tomcat to unload servlets gracefully and then stop. Maybe the current "stop" command of daemonctl.c could be renamed to "kill" or "abort" and "stop" could execute the command above. How-To-Repeat: Install tomcat4 via www/jakarta-tomcat4 port, start it and then stop it.
Responsible Changed From-To: freebsd-ports->znerd I should handle this.
State Changed From-To: open->analyzed This is a good idea.
State Changed From-To: analyzed->feedback Is this PR still relevant? We are sorry for the delay. Let's sort this out now.
Responsible Changed From-To: znerd->freebsd-java With znerd's permission, I'm doing a cleanup of his PRs as he is not active on the FreeBSD ports front for now. Over to the FreeBSD Java community.
Solution I submitted to ports/38018 fixes this also.
Dear maintainer, please look into this issue! Volker
Responsible Changed From-To: freebsd-java->lawrance Handle it.
State Changed From-To: feedback->closed An rc script was committed to tomcat 4, 4.1, 5, and 5.5 which improves on the shutdown process. The new process uses bootstrap.jar to initiate a clean shutdown. After a default timeout of 10 seconds, the tomcat process will be killed. This is configurable using the tomcatXX_stop_timeout rc variable. Please see the rc scripts for details. Thanks for your submission!