From 2f72b7182990e98e677442027104b595c2d03951 Mon Sep 17 00:00:00 2001 From: Torsten Mielke Date: Tue, 6 Dec 2011 13:52:24 +0000 Subject: [PATCH] Added javadoc for BrokerService.start(boolean force) to discourage its use. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1210917 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/BrokerService.java | 14 ++++++++++++++ 1 file changed, 14 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 7a37b10d39..ee9a9363f2 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 @@ -439,6 +439,20 @@ public class BrokerService implements Service { return started.get(); } + /** + * Forces a start of the broker. + * By default a BrokerService instance that was + * previously stopped using BrokerService.stop() cannot be restarted + * using BrokerService.start(). + * This method enforces a restart. + * It is not recommended to force a restart of the broker and will not work + * for most but some very trivial broker configurations. + * For restarting a broker instance we recommend to first call stop() on + * the old instance and then recreate a new BrokerService instance. + * + * @param force - if true enforces a restart. + * @throws Exception + */ public void start(boolean force) throws Exception { forceStart = force; stopped.set(false);