You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Marco Buss <ma...@gmx.de> on 2008/05/05 16:54:53 UTC

Re: Tomcat doesn't shutdown when amq client used within webapp

Hello,

i use a ContextListener. In this Listener i tell every Subscriber that he
must close his open connection to the Broker. This works for me becaus the
Subscribers are Singletons in my case.

MfG
Marco


DominicTulley wrote:
> 
> When we shut down our tomcat server the java process does not terminate
> and it turns out that the culprit is a couple of threads belonging to the
> amq client library.
> The threads are "InactivityMonitor WriteCheck" and "InactivityMonitor
> ReadCheck".
> 
> Having had a look at it there seem to be two possibilities.  Either there
> is some client shutdown method we need to call which will ultimately call
> InactivityMonitor.stop(), or the two threads should be daemon threads so
> that they just evaporate.
> 
> I put in a change to make them daemon threads (trivial change) and tomcat
> then shuts down correctly.  So, my question is, do we need this change in
> AMQ or is there some shutdown call I should be making into the libraries? 
> I am (as far as I can tell!) already closing all the connections we have
> open.
> 
> Thanks,
> 
> -Dominic
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-doesn%27t-shutdown-when-amq-client-used-within-webapp-tp16834603s2354p17063477.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Tomcat doesn't shutdown when amq client used within webapp

Posted by DominicTulley <do...@telelogic.com>.
Hi Marco,
thanks for the suggestion.  I think there might be two similar but different
problems.  The jira I raised has been resolved and my immediate problem has
gone away with it.  However, I have seen a report of subscriber/listener
threads not going away on this forum as well and I wonder if your suggestion
is a way to deal with that...

-Dominic

Marco Buss wrote:
> 
> Hello,
> 
> i use a ContextListener. In this Listener i tell every Subscriber that he
> must close his open connection to the Broker. This works for me becaus the
> Subscribers are Singletons in my case.
> 
> MfG
> Marco
> 
> 
> DominicTulley wrote:
>> 
>> When we shut down our tomcat server the java process does not terminate
>> and it turns out that the culprit is a couple of threads belonging to the
>> amq client library.
>> The threads are "InactivityMonitor WriteCheck" and "InactivityMonitor
>> ReadCheck".
>> 
>> Having had a look at it there seem to be two possibilities.  Either there
>> is some client shutdown method we need to call which will ultimately call
>> InactivityMonitor.stop(), or the two threads should be daemon threads so
>> that they just evaporate.
>> 
>> I put in a change to make them daemon threads (trivial change) and tomcat
>> then shuts down correctly.  So, my question is, do we need this change in
>> AMQ or is there some shutdown call I should be making into the libraries? 
>> I am (as far as I can tell!) already closing all the connections we have
>> open.
>> 
>> Thanks,
>> 
>> -Dominic
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-doesn%27t-shutdown-when-amq-client-used-within-webapp-tp16834603s2354p17063544.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.