From 2dcd10befc74f8e8392302ad8570c8960a6b9f1e Mon Sep 17 00:00:00 2001 From: jbertram Date: Mon, 18 Jan 2016 11:48:40 -0600 Subject: [PATCH] ARTEMIS-336 fix 'stop' command --- .../org/apache/activemq/artemis/cli/commands/Stop.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java index 5f89253707..800c0cf856 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java @@ -19,7 +19,6 @@ package org.apache.activemq.artemis.cli.commands; import java.io.File; import io.airlift.airline.Command; -import org.apache.activemq.artemis.dto.BrokerDTO; @Command(name = "stop", description = "stops the broker instance") public class Stop extends Configurable { @@ -27,9 +26,14 @@ public class Stop extends Configurable { @Override public Object execute(ActionContext context) throws Exception { super.execute(context); - BrokerDTO broker = getBrokerDTO(); - File file = broker.server.getConfigurationFile().getParentFile(); + String value = getConfiguration(); + + if (value != null && value.startsWith("xml:")) { + value = value.substring("xml:".length()); + } + + File file = new File(value).getParentFile(); File stopFile = new File(file, "STOP_ME");