activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Create a broker with vm and tcp transport connectors
Date Fri, 05 May 2006 08:42:00 GMT
On 5/5/06, Javier Leyba <xleyba@gmail.com> wrote:
> On 5/5/06, James Strachan <james.strachan@gmail.com> wrote:
> >
> > > Additionallly is there a way to programatically create the BrokerService
> > > whilst using an xml file to configure the broker?
> >
> > Its one or the other. The XML file creates a BrokerService - or you
> > can create it with Java.
> >
>
>
> Is this true ?
>
> I'm creating a service with java that reads its config from a xml file !!!
>
> ----------
> URI brokerURI = new URI("xbean:" +
> System.getProperty("jboss.server.config.url") + "activemq_slave.xml");
>             serviceSlave = BrokerFactory.createBroker(brokerURI);
>             if (serviceSlave != null) {
>                 serviceSlave.start();
>             }
> ------------
>
>
> Am I wrong ?

So you can instantiate the BrokerService and configure it explicitly
in Java code - or you can create it via the XML configuration file
using the above method or the spring factory bean. But still its one
or the other - your Java code instantiates and configures the
BrokerService - or the XML does it for you.

--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message