activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r745833 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
Date Thu, 19 Feb 2009 12:09:21 GMT
Author: dejanb
Date: Thu Feb 19 12:09:21 2009
New Revision: 745833

URL: http://svn.apache.org/viewvc?rev=745833&view=rev
Log:
additional fix for https://issues.apache.org/activemq/browse/AMQ-2085

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java?rev=745833&r1=745832&r2=745833&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
Thu Feb 19 12:09:21 2009
@@ -55,7 +55,7 @@
     private boolean createMBeanServer = true;
     private boolean locallyCreateMBeanServer;
     private boolean createConnector = true;
-    private boolean findTigerMbeanServer;
+    private boolean findTigerMbeanServer = true;
     private int connectorPort = 1099;
     private int rmiServerPort;
     private String connectorPath = "/jmxrmi";
@@ -297,7 +297,7 @@
         return result;
     }
 
-    public static MBeanServer findTigerMBeanServer() {
+    public MBeanServer findTigerMBeanServer() {
         String name = "java.lang.management.ManagementFactory";
         Class type = loadClass(name, ManagementContext.class.getClassLoader());
         if (type != null) {
@@ -306,6 +306,9 @@
                 if (method != null) {
                     Object answer = method.invoke(null, new Object[0]);
                     if (answer instanceof MBeanServer) {
+                    	if (createConnector) {
+                    		createConnector((MBeanServer)answer);
+                    	}
                         return (MBeanServer)answer;
                     } else {
                         LOG.warn("Could not cast: " + answer + " into an MBeanServer. There
must be some classloader strangeness in town");



Mime
View raw message