You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Christopher Lee <ch...@gmail.com> on 2012/11/26 17:44:46 UTC

Embedding the java qpid broker

Hi Gents,

I want to know if there is a standard approach for doing this.  If not, is
there anything wrong with my current approach:

Startup: Use BrokerOption.java pass the config file location and start with
Broker.java.
Cleanup: ApplicationRegistry#remove, System#exit(status)

-Chris.

Re: Embedding the java qpid broker

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Chris

What youve described is roughly what was intended when we refactored the
startup process to end up with the Broker class.

Starting up is indeed a case of providing a BrokerOptions config to a
Broker instance via startup(..). When shutting down you can simply call
broker.shutdown() before your system.exit() (though that shouldnt strictly
be necessary if shutdown went cleanly).

Robbie


On 26 November 2012 16:44, Christopher Lee <ch...@gmail.com>wrote:

> Hi Gents,
>
> I want to know if there is a standard approach for doing this.  If not, is
> there anything wrong with my current approach:
>
> Startup: Use BrokerOption.java pass the config file location and start with
> Broker.java.
> Cleanup: ApplicationRegistry#remove, System#exit(status)
>
> -Chris.
>