From 35593638f5d45f7ba5a76d4431afe725563f633e Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 24 May 2010 15:36:14 +0000 Subject: [PATCH] resolve ConnectorXBeanConfigTest, broker service needs to null more impls at shutdown to allow restart to find new impls of scheudaler etc. consequence of fixes for https://issues.apache.org/activemq/browse/AMQ-2620 and https://issues.apache.org/activemq/browse/AMQ-2568 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@947671 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/BrokerService.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 6451600fcc..a25740f73d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -563,14 +563,19 @@ public class BrokerService implements Service { VMTransportFactory.stopped(getBrokerName()); if (broker != null) { stopper.stop(broker); + broker = null; } + if (tempDataStore != null) { tempDataStore.stop(); + tempDataStore = null; } stopper.stop(persistenceAdapter); + persistenceAdapter = null; slave = true; if (isUseJmx()) { stopper.stop(getManagementContext()); + managementContext = null; } // Clear SelectorParser cache to free memory SelectorParser.clearCache(); @@ -596,13 +601,20 @@ public class BrokerService implements Service { } if (this.taskRunnerFactory != null) { this.taskRunnerFactory.shutdown(); + this.taskRunnerFactory = null; } if (this.scheduler != null) { this.scheduler.stop(); + this.scheduler = null; } if (this.executor != null) { this.executor.shutdownNow(); + this.executor = null; } + + this.destinationInterceptors = null; + this.destinationFactory = null; + LOG.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + ") stopped"); synchronized (shutdownHooks) { for (Runnable hook : shutdownHooks) {