activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully" <gary.tu...@gmail.com>
Subject Re: Restart of embedded broker causes BrokerStoppedException
Date Thu, 28 Aug 2008 14:39:23 GMT
sorry, that mail was sent a little prematurely.

just to add that it should be possible to loop around broker.start()
and broker.stop() once the broker.waitUntilStopped() is used.

2008/8/28 Gary Tully <gary.tully@gmail.com>:
> You might want to post your code so we can take a peek.
> Stop is async, so it could be that the broker is not fully stopped.
>
> One thing that that help is if you add a call to waitUntilStopped().
>
> while(...) {
> broker.start();
> broker.stop(0;
> broker.waitUntilStopped();
>
> 2008/8/28 taf <torgeir@fikse.net>:
>>
>> Hi,
>> I'm running activemq embedded and wants to be able to restart the broker
>> without terminating the host application. The broker starts fine on
>> application startup and calling stop() therafter also works fine, but when
>> trying to start it again, it results in a BrokerStoppedException.
>>
>> I've traced the call into the start method in MutableBrokerFilter where the
>> call to getNext().start() actually returns an ErrorBroker (which of-course
>> gives me a BrokerStoppedException when trying to start it).
>>
>> I would have thought that the call should be this.start(), as my broker is
>> successfully bound to this.
>> And why does getNext even return an ErrorBroker?
>>
>> Am I missing something obvious here?
>>
>> Regards,
>> - Torgeir Fikse
>>
>>
>> --
>> View this message in context: http://www.nabble.com/Restart-of-embedded-broker-causes-BrokerStoppedException-tp19198844p19198844.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>

Mime
View raw message