From 69d825830811e0088bfe61f57794defa2331e0d7 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Thu, 3 Jan 2013 15:17:35 +0000 Subject: [PATCH] fix up master advisory, advisories are only fired after broker is fully started so the nowMaster advisory needs to ocurr after start rather than as part of persistence adapter start, resolves org.apache.activemq.broker.ft.QueueMasterSlaveTestSupport#testAdvisory failures git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1428397 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/broker/BrokerService.java | 1 + .../org/apache/activemq/broker/LockableServiceSupport.java | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java index 0769f33985..d350dfd4dd 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -662,6 +662,7 @@ public class BrokerService implements Service { getBroker().brokerServiceStarted(); checkSystemUsageLimits(); startedLatch.countDown(); + getBroker().nowMasterBroker(); } /** diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java index f1771fe433..f041aaff48 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/LockableServiceSupport.java @@ -89,9 +89,6 @@ public abstract class LockableServiceSupport extends ServiceSupport implements L } }, lockKeepAlivePeriod, lockKeepAlivePeriod, TimeUnit.MILLISECONDS); } - if (brokerService != null) { - brokerService.getBroker().nowMasterBroker(); - } } } }