activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: ActiveMQ and Java Shudown Hook
Date Tue, 27 May 2008 14:35:20 GMT
Please post a junit test which asserts your error condition so that we
can more easily understand the context of your problem.

On Mon, May 26, 2008 at 2:30 PM, abdoulzak <abdoulzak@gmail.com> wrote:
>
> Hi,
> I have JMS client (daemon) witch implements MessageListener and
> ExceptionListener when an exception caught  the  client stopped by calling
> the shutdown method. I do nothing in onException() just logging.
> here is the shutdown method :
>
>  private static void addDaemonShutdownHook()
>   {
>      Runtime.getRuntime().addShutdownHook(new Thread()
>         {
>            public void run()
>            {
>               ConsumerFacade.shutdown();
>            }
>         });
>   }
>
> Shutdown :
>
> public static void shutdown()
>   {
>      try
>      {
>         consumer.stop();
>         log.info("Shutdown completed.");
>      }
>      catch (Exception e)
>      {
>         log.error("Exception while waiting consumer to stop.");
>
>      }
>   }
>
> I use ActiveMQ 5.1.0, but if I change the version to 5.0.0 i did not have
> the same problem; it work perfectly.
>
> Have you any idea?
>
> --
> View this message in context: http://www.nabble.com/ActiveMQ-and-Java-Shudown-Hook-tp17476962s2354p17476962.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://open.iona.com

Mime
View raw message