tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject svn commit: r677910 - in /tomcat/trunk/java/org/apache: catalina/startup/Bootstrap.java tomcat/util/modeler/Registry.java
Date Fri, 18 Jul 2008 14:11:04 GMT
Author: costin
Date: Fri Jul 18 07:11:03 2008
New Revision: 677910

URL: http://svn.apache.org/viewvc?rev=677910&view=rev
Log:
This was discussed a month ago - didn't hear any objections. It uses the 'platform' mbean
server instead of a new one if none 
was explicitely created. This allows using jconsole without any flags - without the change
it would only show platform mbeans,
now it has tomcat mbeans as well.


Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=677910&r1=677909&r2=677910&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Fri Jul 18 07:11:03 2008
@@ -20,6 +20,7 @@
 
 
 import java.io.File;
+import java.lang.management.ManagementFactory;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -179,7 +180,7 @@
             mBeanServer =
                 (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
         } else {
-            mBeanServer = MBeanServerFactory.createMBeanServer();
+            mBeanServer = ManagementFactory.getPlatformMBeanServer();
         }
 
         // Register the server classloader

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java?rev=677910&r1=677909&r2=677910&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Fri Jul 18 07:11:03 2008
@@ -22,6 +22,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
+import java.lang.management.ManagementFactory;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -593,7 +594,7 @@
                     log.debug("Using existing MBeanServer " + (System.currentTimeMillis()
- t1 ));
                 }
             } else {
-                server=MBeanServerFactory.createMBeanServer();
+                server = ManagementFactory.getPlatformMBeanServer();
                 if( log.isDebugEnabled() ) {
                     log.debug("Creating MBeanServer"+ (System.currentTimeMillis() - t1 ));
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message