activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/3] activemq-artemis git commit: ARTEMIS-336 fix 'stop' command
Date Tue, 19 Jan 2016 14:46:00 GMT
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 <jbertram@apache.org>
Authored: Mon Jan 18 11:48:40 2016 -0600
Committer: Clebert Suconic <clebertsuconic@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");
 


Mime
View raw message