You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rbrown3 <rb...@bluebottle.com> on 2008/07/21 21:24:19 UTC

Catching Exceptions in Embedded ActiveMQ

Greetings:

   I am running an application that has an embedded ActiveMQ broker. I am
noticing that whenever something fails in the broker, ActiveMQ throws an
exception which I cannot seem to catch.

   I have tried a number of things to catch exceptions thrown by ActiveMQ,
including putting the entire embedded startup code into a try- catch block.
Nothing seems to work. 

   I might want my application to perform some special action or even to
(perhaps) shut down gracefully when ActiveMQ throws an exception.
Unfortunately, these exceptions seem to occur somewhere where I cannot get
at them.

   Is there a way from within an application to catch an exception thrown by
an embedded ActiveMQ broker??? I really need to know how to do this.

   Thank you.

-- 
View this message in context: http://www.nabble.com/Catching-Exceptions-in-Embedded-ActiveMQ-tp18575698p18575698.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Catching Exceptions in Embedded ActiveMQ

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

maybe you can try ExceptionListener or TransportListener to handle these
async exceptions?

Regards
-- 
Dejan Bosanac
www.scriptinginjava.net

On Mon, Jul 21, 2008 at 9:24 PM, rbrown3 <rb...@bluebottle.com> wrote:

>
> Greetings:
>
>   I am running an application that has an embedded ActiveMQ broker. I am
> noticing that whenever something fails in the broker, ActiveMQ throws an
> exception which I cannot seem to catch.
>
>   I have tried a number of things to catch exceptions thrown by ActiveMQ,
> including putting the entire embedded startup code into a try- catch block.
> Nothing seems to work.
>
>   I might want my application to perform some special action or even to
> (perhaps) shut down gracefully when ActiveMQ throws an exception.
> Unfortunately, these exceptions seem to occur somewhere where I cannot get
> at them.
>
>   Is there a way from within an application to catch an exception thrown by
> an embedded ActiveMQ broker??? I really need to know how to do this.
>
>   Thank you.
>
> --
> View this message in context:
> http://www.nabble.com/Catching-Exceptions-in-Embedded-ActiveMQ-tp18575698p18575698.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>