activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject activemq-artemis git commit: Support using the cli.Artemis to boot up a broker without using the boot.Artemis class.
Date Wed, 06 Jan 2016 17:00:08 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master bd6cd0d13 -> 3e6dcd05e


Support using the cli.Artemis to boot up a broker without using the boot.Artemis class.

This is handy for when you want to start Artemis in an IDE where it's not in the distro packaging
and the classpath is being managed by the IDE.

It just needed to handle using the artemis.instance system prop.

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

Branch: refs/heads/master
Commit: 3e6dcd05e138e9cc0c42933bc9244ae04d487eb1
Parents: bd6cd0d
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Wed Jan 6 11:59:56 2016 -0500
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Wed Jan 6 11:59:56 2016 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/cli/Artemis.java     | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e6dcd05/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
index 681a745..8cdf02f 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
@@ -40,10 +40,23 @@ import org.apache.activemq.artemis.cli.commands.tools.PrintData;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataExporter;
 import org.apache.activemq.artemis.cli.commands.tools.XmlDataImporter;
 
+/**
+ * Artemis is the main CLI entry point for managing/running a broker.
+ *
+ * Want to start or debug a broker from an IDE?  This is probably the best class to
+ * run.  Make sure set the -Dartemis.instance=path/to/instance system property.
+ * You should also use the 'apache-artemis' module for the class path since that
+ * includes all artemis modules.
+ */
 public class Artemis {
 
    public static void main(String... args) throws Exception {
-      execute(null, null, args);
+      String home = System.getProperty("artemis.home");
+      File fileHome = home != null ? new File(home) : null;
+      String instance = System.getProperty("artemis.instance");
+      File fileInstance = instance != null ? new File(instance) : null;
+
+      execute(fileHome, fileInstance, args);
    }
 
    public static Object internalExecute(String... args) throws Exception {


Mime
View raw message