|
From: <nic...@uk...> - 2005-02-17 13:30:05
|
I havent seen tomcat actually do this... (later version might..)
The correct approach is not to use a servlet.
Instead use a Servlet Listener.
-Nick
Internet
Da...@le...@lists.sourceforge.net - 17/02/2005 00:19
Please respond to wra...@li...
Sent by: wra...@li...
To: wrapper-user
cc:
Subject: [Wrapper-user] Re2: application runs a thread - Tomcat does not
stop completely
Yes, but what if the servlet is collected by the container during normal
garbage collection? After all, the servlet that launches the thread is
not doing anything. If it gets collected, destroy is called and my
thread would end!
-Dave
From: <nick@uk...>.bnpparibas.com
<http://sourceforge.net/mailarchive/message.php?msg_id=10873120> Re:
application runs a thread - Tomcat does not stop completely
2005-02-15 18:09
You need to use your serlvlet destroy() method to stop your thread (I
assume you are starting the thread in a servlet)....
I do a ;
while (continue) {
whatever();
nap();
}
and get the destroy to toggle "continue"
-Nick
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Internet
Dave@le...@li... - 16/02/2005 00:44
Please respond to wrapper-user@li...
Sent by: wrapper-user-admin@li...
To: wrapper-user
cc:
Subject: [Wrapper-user] application runs a thread - Tomcat does not
stop
completely
Hello - I cannot seem to get my Tomcat application to stop completely
on
Windows XP.
I think I know generally what is happening. The shutdown is issued to
Tomcat correctly. However, my application runs a thread, which sleeps
for an interval, wakes up, then goes back to sleep. The servlet
container is not exiting because it is waiting for all of the threads
to
end. When I try the service shutdown while the thread is running I get
this in the log:
ERROR | wrapper | 2005/02/15 16:37:38 | Shutdown failed: Timed out
waiting for signal from JVM.
ERROR | wrapper | 2005/02/15 16:37:39 | JVM did not exit on request,
terminated
If I end my Thread before stopping the service, it all works hunky
dory.
However, I do not want to rely on the user stopping the thread.
I want to be able to call one of my classes so I can shut down the
application"s thread. I have tried everything, mostly using
WrapperStartStopApp. Help!
-Dave
(See attached file: C.htm)(Embedded image moved to file: pic04678.jpg)
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
**********************************************************************************************
BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.
BNP Paribas Securities Services London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.
BNP Paribas Fund Services UK Limited is authorised and
regulated by the Financial Services Authority.
|