activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [15/29] git commit: https://issues.apache.org/jira/browse/AMQ-4526 - prevent JMX restart if restartAllowed=false
Date Thu, 20 Mar 2014 17:44:26 GMT
https://issues.apache.org/jira/browse/AMQ-4526 - prevent JMX restart if restartAllowed=false


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/665df5b1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/665df5b1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/665df5b1

Branch: refs/heads/activemq-5.9
Commit: 665df5b1ca8fc930a260ca0dd15584230f95e3b1
Parents: 06c568a
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Fri Jan 31 12:26:20 2014 +0100
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Thu Mar 20 13:10:50 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/broker/jmx/BrokerView.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/665df5b1/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
index f0c92c3..b0ddf70 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
@@ -120,8 +120,12 @@ public class BrokerView implements BrokerViewMBean {
 
     @Override
     public void restart() throws Exception {
-        brokerService.requestRestart();
-        brokerService.stop();
+        if (brokerService.isRestartAllowed()) {
+            brokerService.requestRestart();
+            brokerService.stop();
+        } else {
+            throw new Exception("Restart is not allowed");
+        }
     }
 
     @Override


Mime
View raw message