servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r411142 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java
Date Fri, 02 Jun 2006 12:35:18 GMT
Author: gnodet
Date: Fri Jun  2 05:35:17 2006
New Revision: 411142

URL: http://svn.apache.org/viewvc?rev=411142&view=rev
Log:
Disable JMX when embedded=true is set

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java?rev=411142&r1=411141&r2=411142&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/ManagementContext.java
Fri Jun  2 05:35:17 2006
@@ -135,12 +135,15 @@
     
      */
     public void init(JBIContainer container, MBeanServer server) throws JBIException  {
-        //TODO - when activemq is up to date
-        //mbeanServerContext.setMBeanServer(server);
-        try{
+        if (container.isEmbedded() && server == null) {
+            mbeanServerContext.setUseMBeanServer(false);
+            mbeanServerContext.setCreateMBeanServer(false);
+        }
+        mbeanServerContext.setMBeanServer(server);
+        try {
             mbeanServerContext.start();
-        }catch(IOException e){
-           log.error("Failed to start mbeanServerContext",e);
+        } catch (IOException e) {
+            log.error("Failed to start mbeanServerContext", e);
         }
         this.executors = Executors.newCachedThreadPool();
         super.init(container);



Mime
View raw message