activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject activemq git commit: AMQ-5247: Make jmxUseLocal global settable
Date Tue, 22 Nov 2016 11:11:13 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 00129837d -> 7dc70e03e


AMQ-5247: Make jmxUseLocal global settable


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

Branch: refs/heads/master
Commit: 7dc70e03ea86021c39780e6f8ec68df4eff08595
Parents: 0012983
Author: Benjamin Graf <benjamin.graf@gmx.net>
Authored: Sun Nov 20 17:27:31 2016 +0100
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Tue Nov 22 12:11:06 2016 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/console/command/AbstractJmxCommand.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/7dc70e03/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
----------------------------------------------------------------------
diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
b/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
index 629ccd8..97e5084 100644
--- a/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
+++ b/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
@@ -38,11 +38,11 @@ public abstract class AbstractJmxCommand extends AbstractCommand {
     public static String DEFAULT_JMX_URL;
     private static String jmxUser;
     private static String jmxPassword;
+    private static boolean jmxUseLocal;
     private static final String CONNECTOR_ADDRESS =
         "com.sun.management.jmxremote.localConnectorAddress";
 
     private JMXServiceURL jmxServiceUrl;
-    private boolean jmxUseLocal;
     private JMXConnector jmxConnector;
     private MBeanServerConnection jmxConnection;
 
@@ -50,6 +50,7 @@ public abstract class AbstractJmxCommand extends AbstractCommand {
         DEFAULT_JMX_URL = System.getProperty("activemq.jmx.url", "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi");
         jmxUser = System.getProperty("activemq.jmx.user");
         jmxPassword = System.getProperty("activemq.jmx.password");
+        jmxUseLocal = Boolean.parseBoolean(System.getProperty("activemq.jmx.useLocal", "false"));
     }
 
     /**
@@ -255,7 +256,7 @@ public abstract class AbstractJmxCommand extends AbstractCommand {
      * @param jmxUseLocal - <code>true</code> if the mbean server from this JVM
should be used, <code>false<code> if the jmx url should be used
      */
     public void setJmxUseLocal(boolean jmxUseLocal) {
-        this.jmxUseLocal = jmxUseLocal;
+        AbstractJmxCommand.jmxUseLocal = jmxUseLocal;
     }
 
     /**


Mime
View raw message