tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Augmentin" <augmen...@hkbn.net>
Subject how to stop user app daemon threads in tomcat webapps?
Date Mon, 07 Nov 2005 03:36:16 GMT
Hi,

I found that the daemon threads created by my Tomcat webapp won't automatically stop when
the webapp itself is stopped or undeployed/redeployed.

As Tomcat itself is a java application there will always be user threads in the jvm even when
your webapp is stopped.. which makes the daemon threads spawned by webapps never stop.

I tried to add a finalize() method to a main object in the webapp to interrupt the daemon
threads but it didn't seem to work... the timing of call to finalize() is undetermined, only
when it performs garbage collection. And many times it seemed that when my webapp is stopped/reloaded/undeployed/redeployed
the objects were just not properly finalized or garbage collected at all.

I am using Tomcat 5.5.9 on Windows XP Pro and Solaris 2.6.

Thank you for your help.
Raymond.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message