You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by johoso <jo...@smarttrust.com> on 2008/08/04 19:00:39 UTC

receive() does not throw exception when activemq.bat is terminated

Hi

I'm quite a new user to ActiveMq and it's queuing system but as I have
understood it the: receive(5000) or receive() (I've also tried
receiveNoWait()) should both throw an exception if they are run when the
activemq.bat has been terminated. 

The reason why I'm terminating is because I want to simulate how my system
reacts if the ActiveMQ is shut down.

Thanks for any pointers or ideas!
-- 
View this message in context: http://www.nabble.com/receive%28%29-does-not-throw-exception-when-activemq.bat-is-terminated-tp18815309p18815309.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receive() does not throw exception when activemq.bat is terminated

Posted by David Sitsky <si...@nuix.com>.
> I'm quite a new user to ActiveMq and it's queuing system but as I have
> understood it the: receive(5000) or receive() (I've also tried
> receiveNoWait()) should both throw an exception if they are run when the
> activemq.bat has been terminated. 

Have a look at the Connection.setExceptionListener(ExceptionListener) 
method.  This is the right way for your application to be notified if 
the connection to the JMS provider has been lost.

-- 
Cheers,
David

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://www.nuix.com                            Fax: +61 2 9212 6902