mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3696 - fix regression in FailoverStaticNetworkTest, in jvm slave overwriting broker registry entry of master
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1364973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51927e6f89
commit
0051c4ea6f
|
@ -520,9 +520,14 @@ public class BrokerService implements Service {
|
||||||
if (isUseJmx()) {
|
if (isUseJmx()) {
|
||||||
startManagementContext();
|
startManagementContext();
|
||||||
}
|
}
|
||||||
BrokerRegistry.getInstance().bind(getBrokerName(), BrokerService.this);
|
// in jvm master slave, lets not publish over existing broker till we get the lock
|
||||||
|
final BrokerRegistry brokerRegistry = BrokerRegistry.getInstance();
|
||||||
|
if (brokerRegistry.lookup(getBrokerName()) == null) {
|
||||||
|
brokerRegistry.bind(getBrokerName(), BrokerService.this);
|
||||||
|
}
|
||||||
startPersistenceAdapter(startAsync);
|
startPersistenceAdapter(startAsync);
|
||||||
startBroker(startAsync);
|
startBroker(startAsync);
|
||||||
|
brokerRegistry.bind(getBrokerName(), BrokerService.this);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Failed to start ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + "). Reason: " + e, e);
|
LOG.error("Failed to start ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + "). Reason: " + e, e);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue