You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/01/19 15:46:00 UTC

[2/3] activemq-artemis git commit: ARTEMIS-336 fix 'stop' command

ARTEMIS-336 fix 'stop' command


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

Branch: refs/heads/master
Commit: 2dcd10befc74f8e8392302ad8570c8960a6b9f1e
Parents: d94c044
Author: jbertram <jb...@apache.org>
Authored: Mon Jan 18 11:48:40 2016 -0600
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Jan 19 09:45:52 2016 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/cli/commands/Stop.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2dcd10be/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
----------------------------------------------------------------------
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 5f89253..800c0cf 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");