You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2014/01/31 12:26:53 UTC
git commit: https://issues.apache.org/jira/browse/AMQ-4526 - prevent
JMX restart if restartAllowed=false
Updated Branches:
refs/heads/trunk d36e3c0e9 -> d4d985503
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/d4d98550
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d4d98550
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d4d98550
Branch: refs/heads/trunk
Commit: d4d985503e79334b45cc13d5757a47a7afbb68da
Parents: d36e3c0
Author: Dejan Bosanac <de...@nighttale.net>
Authored: Fri Jan 31 12:26:20 2014 +0100
Committer: Dejan Bosanac <de...@nighttale.net>
Committed: Fri Jan 31 12:26:41 2014 +0100
----------------------------------------------------------------------
.../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/d4d98550/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