mirror of https://github.com/apache/activemq.git
AMQ-2354: JCA adapter. Default the ServerUrl to vm://brokerName?create=false when an embedded broker is specified with brokerXmlConfig. Thanks to Michael McKibben for the patch.
This commit is contained in:
parent
997bbb7a01
commit
1999ddfd01
|
@ -85,6 +85,10 @@ public class ActiveMQResourceAdapter extends ActiveMQConnectionSupport implement
|
|||
broker = BrokerFactory.createBroker(new URI(brokerXmlConfig));
|
||||
}
|
||||
broker.start();
|
||||
// Default the ServerUrl to the local broker if not specified in the ra.xml
|
||||
if (getServerUrl() == null) {
|
||||
setServerUrl("vm://" + broker.getBrokerName() + "?create=false");
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.warn("Could not start up embeded ActiveMQ Broker '"+brokerXmlConfig+"': "+e.getMessage());
|
||||
log.debug("Reason for: "+e.getMessage(), e);
|
||||
|
|
Loading…
Reference in New Issue