You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/08 03:20:43 UTC

svn commit: r504766 - /incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java

Author: jboynes
Date: Wed Feb  7 18:20:42 2007
New Revision: 504766

URL: http://svn.apache.org/viewvc?view=rev&rev=504766
Log:
update InstrumentedComponent to use new Component SPI
I replaced componentName with componentId when creating the MBeanInfo but the javadoc says that requires className
neither the old value or the new one are the className

Modified:
    incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java

Modified: incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java?view=diff&rev=504766&r1=504765&r2=504766
==============================================================================
--- incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java (original)
+++ incubator/tuscany/java/sca/runtime/services/management/jmx/src/main/java/org/apache/tuscany/service/management/jmx/instrument/InstrumentedComponent.java Wed Feb  7 18:20:42 2007
@@ -19,6 +19,7 @@
 package org.apache.tuscany.service.management.jmx.instrument;
 
 import java.util.Map;
+import java.net.URI;
 import javax.management.Attribute;
 import javax.management.AttributeList;
 import javax.management.AttributeNotFoundException;
@@ -48,7 +49,7 @@
     /**
      * Name of the component.
      */
-    private String componentName;
+    private URI componentId;
 
     /**
      * Initializes the property values.
@@ -58,7 +59,7 @@
     @SuppressWarnings("unchecked")
     public InstrumentedComponent(final Component component) {
         this.properties = component.getDefaultPropertyValues();
-        this.componentName = component.getName();
+        this.componentId = component.getUri();
     }
 
     /**
@@ -106,7 +107,7 @@
                 new MBeanAttributeInfo(propertyValue.getName(), String.class.getName(), null, true, false, false);
         }
 
-        return new MBeanInfo(componentName, null, attributes, constructors, operations, notifications);
+        return new MBeanInfo(componentId.toString(), 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