On Wed, Aug 20, 2008 at 01:35:58PM +0100, Gary Tully wrote: > I think the issue is that the broker configured via > "xbean:activemq.xml" is started eagerly. That is, it is started before > your connector is added. What should help is to add a start="false" > attribute to the broker xbean. > > not sure what is deemed the correct way, there are a bunch of ways to > configure and start a broker. A way that works for you is the correct > way! > > hope this helps.
This seems not working, as I found in sources for BrokerFactory:
==============================================================================================
/**
* Creates a broker from a URI configuration
*
* @param brokerURI the URI scheme to configure the broker
* @throws Exception
*/
public static BrokerService createBroker(URI brokerURI) throws Exception {
return createBroker(brokerURI, false);
}
/**
* Creates a broker from a URI configuration
*
* @param brokerURI the URI scheme to configure the broker
* @param startBroker whether or not the broker should have its
* [EMAIL PROTECTED] BrokerService#start()} method called
after
* construction
* @throws Exception
*/
public static BrokerService createBroker(URI brokerURI, boolean
startBroker) throws Exception {
if (brokerURI.getScheme() == null) {
throw new IllegalArgumentException("Invalid broker URI, no scheme
specified: " + brokerURI);
}
BrokerFactoryHandler handler =
createBrokerFactoryHandler(brokerURI.getScheme());
BrokerService broker = handler.createBroker(brokerURI);
if (startBroker) {
broker.start();
}
return broker;
}
==============================================================================================
the method createBroker doesn't start the broker.
Or I didn't understand what you meant with
> What should help is to add a start="false" attribute to the broker xbean.
Could you please advice?
--
Eugene N Dzhurinsky
pgpiazyelN8i5.pgp
Description: PGP signature
