qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sajith Kariyawasam <saj...@gmail.com>
Subject Re: How to remove Qpid Broker Shutdown hook
Date Mon, 01 Oct 2012 09:23:29 GMT
Hi Keith,

Thanks for the response..

On Mon, Oct 1, 2012 at 2:20 PM, Keith W <keith.wall@gmail.com> wrote:

> 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?
>
>
I was able to start the broker using a simple Java class, but when I moved
my logic into an OSGi runtime, I couldn't get that started up
programatically. So I was just thought may be the shutdown hook which
caused the issue..



> 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.
>


Yes, I'm using version 0.18, ok I will try out that way.. thanks


>
> Hope this helps,
>
> Keith.
>
>
> 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
> >
>



-- 
Best Regards
Sajith

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