mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4526 - prevent JMX restart if restartAllowed=false
This commit is contained in:
parent
d36e3c0e95
commit
d4d985503e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue