qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith W <keith.w...@gmail.com>
Subject Re: How to remove Qpid Broker Shutdown hook
Date Mon, 01 Oct 2012 08:50:10 GMT
Hi Sajith

There is currently no way to avoid the registration of the Shutdown hook.
The shutdown hook is used to perform clean-up work in the event that the
Broker is shutdown unexpectedly.  Why would you want to avoid it?

0.16 (QPID-3325) changed the responsibilties for the registration of the
Shutdown hook.
>From that point foward, the Broker class has the responsibility for
registration of the shutdown hook on startup and the removal of shutdown
hook on shutdown.  This was done to better support use cases where the
Broker is deployed within a Container and many instances of the Broker need
to be created/destoyed (serially) over the lifetime of the single JVM.

Assuming you are using 0.16+, rather than calling Main.main(), create the
broker programatically by creating a Broker instance passing a
BrokerOptions instance.  This is the intended use of these class.

Hope this helps,


On 30 September 2012 09:28, Sajith Kariyawasam <sajhak@gmail.com> wrote:

> Hi all,
> I'm trying to startup Qpid broker programatically, through my Java code,
> using Main.main(args);
> There I can see a shutdown hook is added..
> Is there anyway I can remove it .. ?
> using Runtime.getRuntime().removeShutdownHook(<what to pass here ? >);
> --
> Best Regards
> Sajith

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message