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/07 14:49:33 UTC

svn commit: r493722 - in /incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management: JmxManagementService.java instrument/InstrumentedComponent.java

Author: meerajk
Date: Sun Jan  7 05:49:32 2007
New Revision: 493722

URL: http://svn.apache.org/viewvc?view=rev&rev=493722
Log:
Changed getValue to getValueFactory().getInstance() to get 
the property values from managed components.

Modified:
    incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/JmxManagementService.java
    incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/instrument/InstrumentedComponent.java

Modified: incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/JmxManagementService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/JmxManagementService.java?view=diff&rev=493722&r1=493721&r2=493722
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/JmxManagementService.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/JmxManagementService.java Sun Jan  7 05:49:32 2007
@@ -62,7 +62,7 @@
      */
     public final void registerComponent(String name, Component component) throws JmxException {
 
-        try {
+        try {            
             ObjectName on = new ObjectName(managementDomain + ":" + "type=component,name=" + name);
             InstrumentedComponent mbean = new InstrumentedComponent(component);
             mBeanServer.registerMBean(mbean, on);

Modified: incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/instrument/InstrumentedComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/instrument/InstrumentedComponent.java?view=diff&rev=493722&r1=493721&r2=493722
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/instrument/InstrumentedComponent.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/jmx-host/src/main/java/org/apache/tuscany/runtime/standalone/jmx/management/instrument/InstrumentedComponent.java Sun Jan  7 05:49:32 2007
@@ -29,8 +29,6 @@
 import javax.management.MBeanNotificationInfo;
 import javax.management.MBeanOperationInfo;
 
-import org.w3c.dom.Document;
-
 import org.apache.tuscany.spi.component.Component;
 import org.apache.tuscany.spi.model.PropertyValue;
 
@@ -69,7 +67,7 @@
     public final Object getAttribute(final String attribute) throws AttributeNotFoundException {
         PropertyValue<?> propertyValue = properties.get(attribute);
         if (propertyValue != null) {
-            return propertyValue.getValue();
+            return propertyValue.getValueFactory().getInstance();
         }
         throw new AttributeNotFoundException(attribute + " not found.");
     }
@@ -105,7 +103,7 @@
         int i = 0;
         for (PropertyValue<?> propertyValue : properties.values()) {
             attributes[i++] =
-                new MBeanAttributeInfo(propertyValue.getName(), Document.class.getName(), null, true, false, false);
+                new MBeanAttributeInfo(propertyValue.getName(), String.class.getName(), null, true, false, false);
         }
 
         return new MBeanInfo(componentName, null, attributes, constructors, operations, notifications);



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