tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Running tomcat 5.18 as a service under Windows 2003
Date Tue, 10 Feb 2004 21:18:07 GMT


>No!  Additional analysis reveals that if run by the command line,
>shutdown will not always kill the window executing Tomcat.  We do get a
>of messages about how Catalina is shutting down, but the window will
not go
>away until I Ctrl-C inside of it.  At that time, the window goes away
>tomcat is no longer represented in task manager.  Does this help with
>diagnosis any?

Sure does, it's exactly why I asked.  You most likely have non-daemon
threads that aren't being terminated, so the JVM cannot shut down.
Tomcat has shut down its own threads, including the connectors, hence
the 404 pages in the browser, but the JVM itself cannot exit so the
service is stuck.

You need to make sure any threads you start are either daemons or you
terminate them when your app is shutting down.  A
ServletContextListener's contextDestroyed method is one possible place
to do this.

This issue has been discussed on this list in the past, and other
approaches suggested, so you might want to search the archives.

Yoav Shapira

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message