Yep. It's a FAQ, but not in the FAQ.
Tomcat not quitting generally means your webapp has started a non-daemon
thread which does not exit when the webapp is destroyed. If so, shut
them down in a ServletContextListener.
If you aren't explicitly creating threads in your webapp then the usual
May i mention also the use of *java.util.Timer in forms other than
new **java.util.Timer*(true);
If used in any other form, it silently creates a non daemon thread.
Jon Wingfield a écrit :
Yep. It's a FAQ, but not in the FAQ.
Tomcat not quitting generally means your webapp has started a
So, once you know the threads that are left, what is the cleanest way
to kill them?
I have had this problem too, but since it was on a *nix platform, and
just used 'kill' to get rid of the parent process.
Larry
On 10/3/05, Jon Wingfield [EMAIL PROTECTED] wrote:
Yep. It's a FAQ, but not in the
That's quite a problem ;)
Actually your threads should be coded in such a way
you may a send a notification in java telling him to finish his job.
eg:
myNonDaemonThreadICreatedMySelf.stopWorking();
which would set some flag in Thread and then code in your
Thread reading the flag knows it has to
Heh, I'll call IBM and have them do just that. ;-)
It happens in their JT400 classes.
Larry
On 10/3/05, David Delbecq [EMAIL PROTECTED] wrote:
That's quite a problem ;)
Actually your threads should be coded in such a way
you may a send a notification in java telling him to finish his job.
]
Sent: October 3, 2005 8:09 AM
To: Tomcat Users List
Subject: Re: FAQ? shutdown.bat not killing java process on Windows
Heh, I'll call IBM and have them do just that. ;-)
It happens in their JT400 classes.
Larry
On 10/3/05, David Delbecq [EMAIL PROTECTED] wrote:
That's quite a problem
Thanks (to all). I had suspected this but all of the threads that were left
over (used eclipse) seemed like system threads. Turns out the culprit was an
RMI server object that was being exported by the webapp (you can browbeat me
over that in a different thread... I kept it for backwards
From: Charles Fineman [mailto:[EMAIL PROTECTED]
Subject: Re: FAQ? shutdown.bat not killing java process on Windows
Is there another mechanism I ought to be using to initialize
(arbitrary) resources for my webapp?
A context listener might be what you're looking for. See the Lifecycle
I started Tomcat using startup.bat. Everything goes fine. I use
shutdown.batto bring it down. The server fields the request and shuts
down a bunch of
services (as evidenced by the messages I see). Sure enough, the server no
longer responds to any requests. Unfortunately, the java process does not