tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terence M. Bandoian" <>
Subject Re: Terminating Timer Thread Gracefully
Date Sat, 16 Jul 2011 01:01:49 GMT
  On 1:59 PM, Mark Thomas wrote:
> On 14/07/2011 23:59, Terence M. Bandoian wrote:
>>   On 1:59 PM, Mark Thomas wrote:
>>> On 14/07/2011 06:11, Terence M. Bandoian wrote:
>>>> I can live with this.  It's just one of those "it would be nice not to
>>>> have to explain" things and if Thread.sleep does the trick, I'm happy.
>>>> As I mentioned in my original post, I wanted to find out if there was a
>>>> another way to accomplish the same thing that I'd missed.
>>> Daft question, why not set clearReferencesStopTimerThreads="true" on the
>>> Context and get Tomcat to do the clean-up for you?
>>> Mark
>> With that set, I get a similar SEVERE error message that says the web
>> application has started but "failed to stop" a TimerThread and that it
>> was "forcibly canceled" to "prevent a memory leak".
> So what is to prevent you from using the same code Tomcat does to stop
> the thread properly?
> Mark

Yielding after canceling the timer appears to accomplish the same 
purpose.  Thanks for the pointer.


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

View raw message