activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-6 git commit: fix start and stop boorstrap classes
Date Thu, 26 Feb 2015 13:22:19 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master 73638a1d2 -> 5d72befae


fix start and stop boorstrap classes


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

Branch: refs/heads/master
Commit: 6a4b3433c684b16e7a1cca7efadfea81ef3316e5
Parents: 97e6364
Author: Andy Taylor <andytaylor@apache.org>
Authored: Thu Feb 26 11:32:28 2015 +0000
Committer: Andy Taylor <andytaylor@apache.org>
Committed: Thu Feb 26 11:32:28 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/cli/commands/Run.java     | 5 ++++-
 .../src/main/java/org/apache/activemq/cli/commands/Stop.java    | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/6a4b3433/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
----------------------------------------------------------------------
diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
index 9df46c0..d898bfe 100644
--- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
+++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
@@ -31,6 +31,7 @@ import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger;
 import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
 
 import java.io.File;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Timer;
 import java.util.TimerTask;
@@ -62,7 +63,9 @@ public class Run implements Action
 
       BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
 
-      addShutdownHook(new File(broker.server.configuration).getParentFile());
+      String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();
+
+      addShutdownHook(new File(fileName).getParentFile());
 
       ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/6a4b3433/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
----------------------------------------------------------------------
diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
index e0fdc4b..da92f48 100644
--- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
+++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
@@ -22,6 +22,7 @@ import org.apache.activemq.dto.BrokerDTO;
 import org.apache.activemq.factory.BrokerFactory;
 
 import java.io.File;
+import java.net.URI;
 
 @Command(name = "stop", description = "stops the broker instance")
 public class Stop implements Action
@@ -38,7 +39,9 @@ public class Stop implements Action
       }
       BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
 
-      File file = new File(broker.server.configuration).getParentFile();
+      String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();
+
+      File file = new File(fileName).getParentFile();
 
       File stopFile = new File(file, "STOP_ME");
 


Mime
View raw message