I solved writing a simple script to shutting down tomacat and kill the java process:
# stop tomcat su - primelife -c "/usr/local/apache-tomcat-7.0.4/bin; ./shutdown.sh >/dev/null 2>&1" # give application 5 seconds to stop itself sleep 2 # if application is still running kill it anyway app_pid=$(ps axuw | grep -v grep | grep "/usr/local/apache-tomcat-7.0.4/bin" | awk '{print $2}') [[ "x${app_pid}x" == "xx" ]] || kill -9 ${app_pid} >/dev/null 2>&1 Thanks. markt-2 wrote: > > On 03/12/2010 18:36, pix_siro wrote: >> >> Hi all, >> I'm working on Ubuntu 9.10, I have implemented a Java application and I >> have >> installed it on Tomcat 7.0.4 with a WAR file. When I shut down Tomcat >> with >> the command ./shutdown.sh, a java thread remains open. Notice that >> application have a connection with a postgres db but the connections are >> correctly closed. Someone know why? >> With the command ps ax | grep java I have the thread's specifications: > > That is the process, not the specific Java thread. Take a thread dump to > see what threads are still running. You want the non-daemon one. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/java-thread-open-after-Tomcat-shutting-down-tp30366568p30394888.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org