You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/01/04 22:26:54 UTC

svn commit: r492752 - /incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java

Author: meerajk
Date: Thu Jan  4 13:26:53 2007
New Revision: 492752

URL: http://svn.apache.org/viewvc?view=rev&rev=492752
Log:
Added code to register management service.

Modified:
    incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java

Modified: incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java?view=diff&rev=492752&r1=492751&r2=492752
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/JmxRuntimeImpl.java Thu Jan  4 13:26:53 2007
@@ -32,6 +32,7 @@
 import org.apache.tuscany.spi.component.SCAObject;
 import org.apache.tuscany.spi.deployer.Deployer;
 import org.apache.tuscany.spi.loader.LoaderException;
+import org.apache.tuscany.spi.services.management.ManagementService;
 import org.apache.tuscany.spi.wire.WireService;
 
 import org.apache.tuscany.core.bootstrap.Bootstrapper;
@@ -42,6 +43,7 @@
 import org.apache.tuscany.host.RuntimeInfo;
 import org.apache.tuscany.host.runtime.InitializationException;
 
+import org.apache.tuscany.core.services.management.jmx.JmxManagementService;
 import org.apache.tuscany.core.services.management.jmx.runtime.JmxRuntimeInfo;
 
 /**
@@ -71,11 +73,15 @@
         systemComponent = runtime.getSystemComponent();
 
         // register the runtime info provided by the host
-        RuntimeInfo runtimeInfo = getRuntimeInfo();
+        JmxRuntimeInfo runtimeInfo = (JmxRuntimeInfo)getRuntimeInfo();
+
+        ManagementService mgs = new JmxManagementService(runtimeInfo);
+        
         try {
             systemComponent.registerJavaObject(RuntimeInfo.COMPONENT_NAME, RuntimeInfo.class, runtimeInfo);
-            // register the monitor factory provided by the host
             systemComponent.registerJavaObject("MonitorFactory", MonitorFactory.class, mf);
+            systemComponent.registerJavaObject("ManagementService", ManagementService.class, mgs);
+            
         } catch (ComponentRegistrationException e) {
             throw new InitializationException(e);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org