Hey,

Catalina.sh shutdown connects to the shutdown port (8005 by default) and
tells the server to shut down. Tomcat shuts down all its parts, and
that includes destroying servlets, filters, listeners as mandated by the
servlet specification. But tomcat does not call, for example,
System.exit(), as that would break applications that embed tomcat. The
JVM automatically shuts down daemon threads.


Catalina hung again this morning, but specifically, after I shut down my netscape browser, with the Java Console open, with Ctrl-C. Im starting to realise that this is probably what is going on, the JVM is struggling to handle different threads, especially non-daemon threads, am I right?

So basically, I iknow this is off-topic for a tomcat-users page, but if I wanted to track down all the threads that are opened within the JVM at any one time, and the nature of the threads (ie Daemon etc.) and where they come from etc. can I do this?

I can then find out which are the threads that could be causing Catalina to hang...possibly..

Cheers
S





My second question as follows, what exactly do you mean by 'my
application or 3rd party libraries it uses'? Are you saying that if I
use some external jars in my web applications WEB-INF/lib/ directory,
then I have to make sure their use is discontinued, seperately from
catalina.sh??



IF they create non-daemon threads, and they provide shutdown methods, you have to call these methods. If they create daemon threads, or call their own shutdown methods (via finalizers for example), you don't need to worry about it. Same goes for your own code.



Lastly, it seems as if making sure all threads are started as daemons


is


the best way to go but I dont know how to do that?



If you're starting the thread yourself, call setDaemon(true) on it. If it's a 3rd party library, see above.

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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to