On 5/5/06, Javier Leyba <[EMAIL PROTECTED]> wrote:
> On 5/5/06, James Strachan <[EMAIL PROTECTED]> 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/