activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1087251 - /activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
Date Thu, 31 Mar 2011 11:03:29 GMT
Author: dejanb
Date: Thu Mar 31 11:03:28 2011
New Revision: 1087251

URL: http://svn.apache.org/viewvc?rev=1087251&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3247 - DEFAULT_JMX_URL for commands

Modified:
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java?rev=1087251&r1=1087250&r2=1087251&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
(original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
Thu Mar 31 11:03:28 2011
@@ -37,14 +37,20 @@ import javax.management.remote.JMXServic
 import sun.management.ConnectorAddressLink;
 
 public abstract class AbstractJmxCommand extends AbstractCommand {
-    public static final String DEFAULT_JMX_URL    = "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi";
-
+    public static String DEFAULT_JMX_URL;
+    private static String jmxUser;
+    private static String jmxPassword;
+    
     private JMXServiceURL jmxServiceUrl;
-    private String jmxUser;
-    private String jmxPassword;
     private boolean jmxUseLocal;
     private JMXConnector jmxConnector;
     private MBeanServerConnection jmxConnection;
+    
+    static {
+    	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");
+    }
 
     /**
      * Get the current specified JMX service url.



Mime
View raw message