You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by tm...@apache.org on 2011/12/06 14:52:24 UTC
svn commit: r1210917 -
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Author: tmielke
Date: Tue Dec 6 13:52:24 2011
New Revision: 1210917
URL: http://svn.apache.org/viewvc?rev=1210917&view=rev
Log:
Added javadoc for BrokerService.start(boolean force) to discourage its use.
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1210917&r1=1210916&r2=1210917&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java Tue Dec 6 13:52:24 2011
@@ -439,6 +439,20 @@ public class BrokerService implements Se
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);