You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sesik <sv...@citco.com> on 2008/04/24 00:00:27 UTC

App won't exit because Session Task/Connection Worker threads won't die.

Hi,

I'm using ActiveMQ 5.0. I'm having an issue shutting down my application if
the ActiveMQ server is down.

I have a very simple client app that watches for files, and fires messages
with the file name. The app is good enough to recover from a JMS failure if
you bring the ActiveMQ server back up. One can also stop the app via a JMX
call. The issue arises when you try to shut down the application while the
ActiveMQ server is down (a desirable behavior, one would assume).

What happens is, all my threads close gracefully, but the 2 ActiveMQ threads
keep running, not letting the VM exit. I am removing my listener, closing
all sessions/producers/consumers/connections, and yet those threads won't
die.

Is there any way I can kill those threads without having to resort to
System.exit() and kill-9?

************************ClientStarter at localhost:4373	
	Thread [ActiveMQ Session Task] (Running)	
	Thread [DestroyJavaVM] (Running)	
	Thread [AcitveMQ Connection Worker: tcp://jrc1dscon01/10.124.155.209:61666]
(Running)	

Thanks a lot,
Stan
-- 
View this message in context: http://www.nabble.com/App-won%27t-exit-because-Session-Task-Connection-Worker-threads-won%27t-die.-tp16834845s2354p16834845.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: App won't exit because Session Task/Connection Worker threads won't die.

Posted by DominicTulley <do...@telelogic.com>.
I've just raised a 
https://issues.apache.org/activemq/browse/AMQ-1698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
jira  on a very similar issue (but with different threads!).  I wonder if
some sort of thread management callback has been lost from the connection
close method...

-Dominic


sesik wrote:
> 
> Hi,
> 
> I'm using ActiveMQ 5.0. I'm having an issue shutting down my application
> if the ActiveMQ server is down.
> 
> I have a very simple client app that watches for files, and fires messages
> with the file name. The app is good enough to recover from a JMS failure
> if you bring the ActiveMQ server back up. One can also stop the app via a
> JMX call. The issue arises when you try to shut down the application while
> the ActiveMQ server is down (a desirable behavior, one would assume).
> 
> What happens is, all my threads close gracefully, but the 2 ActiveMQ
> threads keep running, not letting the VM exit. I am removing my listener,
> closing all sessions/producers/consumers/connections, and yet those
> threads won't die.
> 
> Is there any way I can kill those threads without having to resort to
> System.exit() and kill-9?
> 
> ************************ClientStarter at localhost:4373	
> 	Thread [ActiveMQ Session Task] (Running)	
> 	Thread [DestroyJavaVM] (Running)	
> 	Thread [AcitveMQ Connection Worker:
> tcp://jrc1dscon01/10.124.155.209:61666] (Running)	
> 
> Thanks a lot,
> Stan
> 

-- 
View this message in context: http://www.nabble.com/App-won%27t-exit-because-Session-Task-Connection-Worker-threads-won%27t-die.-tp16834845s2354p16963622.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.