cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1166294 - /cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
Date Wed, 07 Sep 2011 18:13:38 GMT
Author: dkulp
Date: Wed Sep  7 18:13:37 2011
New Revision: 1166294

URL: http://svn.apache.org/viewvc?rev=1166294&view=rev
Log:
When running in a place (like OSGi) where an MBeanServer is available
via a Bus extension, go head and use it to register our beans.

Modified:
    cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java

Modified: cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java?rev=1166294&r1=1166293&r2=1166294&view=diff
==============================================================================
--- cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
(original)
+++ cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/InstrumentationManagerImpl.java
Wed Sep  7 18:13:37 2011
@@ -117,9 +117,13 @@ public class InstrumentationManagerImpl 
     }
     
     @PostConstruct     
-    public void init() {    
+    public void init() {
+        if (bus != null && bus.getExtension(MBeanServer.class) != null) {
+            enabled = true;
+            createMBServerConnectorFactory = false;
+            mbs = bus.getExtension(MBeanServer.class);
+        }
         if (isEnabled()) {
-            
             if (mbs == null) {
                 // return platform mbean server if the option is specified.
                 if (usePlatformMBeanServer) {



Mime
View raw message