activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Trivial embedded broker not shutting down cleanly because of lingering threads
Date Wed, 13 Jan 2010 23:59:11 GMT
oops - sry Fred - read your first email too quick - could you post the  
ThreadExplorer class too ?

thanks,

Rob
On 13 Jan 2010, at 22:24, Fred Moore wrote:

> Hi Rob,
>
>> If you could post your code - or sample of it - might help
>> identify why your main isn't shutting down
>
> I actually did... can you access this pastebin here:
> http://pastebin.com/f2784245a ?
>
> Cheers,
> F.
>
> On Wed, Jan 13, 2010 at 7:52 PM, Rob Davies <rajdavies@gmail.com>  
> wrote:
>
>> Do you actually call stop() on the broker ? - Have you disabled the
>> shutdownHook from the broker ?
>> If you could post your code - or sample of it - might help identify  
>> why
>> your main isn't shutting down
>>
>> On 13 Jan 2010, at 17:50, Fred Moore wrote:
>>
>> Hi folks,
>>>
>>> we have a 5.3.0 embedded broker that refuses to shutdown cleanly  
>>> because
>>> of
>>> lingering threads.
>>>
>>> We reproduced this with a very very basic configuration: with just  
>>> vm &
>>> jmx
>>> connectors, no producers and no consumers and and this extremely  
>>> simple
>>> main() program: http://pastebin.com/f2784245a that:
>>>
>>> 1\ Starts up an embedded broker
>>>
>>> 2\ Waits for the user to press a key
>>>
>>> 3\ Stops the broker
>>>
>>> 4\ Monitors (polling every few seconds) the number of lingering  
>>> threads
>>>
>>> What we experience is that after step 1\ (broker startup) this is  
>>> the list
>>> of active threads...
>>>
>>> * [main] Group: main
>>> * [ActiveMQ Scheduler] (Daemon) Group: main
>>> * [ActiveMQ Data File Writer] (Daemon) Group: main
>>> * [Timer-0] (Daemon) Group: main
>>> * [JMX connector] (Daemon) Group: main
>>>
>>> ...but a long time (dozens of seconds) after step 3\ (broker  
>>> shutdown)
>>> these
>>> threads are still active:
>>>
>>> * [main]  Group: main
>>> * [ActiveMQ Scheduler] (Daemon) Group: main
>>> * [Timer-0] (Daemon) Group: main
>>>
>>> Questions:
>>> Q1\ Are we missing something obvious?
>>> Q2\ Is there a better way to shutdown an embedded broker?
>>> Q3\ Doing it the hard way via system.exit() is going to get us  
>>> into worse
>>> troubles? (data corruption & co)
>>>
>>> Thanks in advance for your help.
>>> Cheers,
>>> F.
>>>
>>>
>>>
>>>
>>> The embedding was performed
>>>
>>
>> Rob Davies
>> http://twitter.com/rajdavies
>> I work here: http://fusesource.com
>> My Blog: http://rajdavies.blogspot.com/
>> I'm writing this: http://www.manning.com/snyder/
>>
>>
>>
>>
>>
>>

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/






Mime
View raw message