tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Seaver <samsea...@northwestern.edu>
Subject Re: [Fwd: Catalina suspends for no reason?!?]
Date Mon, 09 Feb 2004 18:33:30 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message