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/01 14:45:17 UTC

svn commit: r491571 - /incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java

Author: meerajk
Date: Mon Jan  1 05:45:17 2007
New Revision: 491571

URL: http://svn.apache.org/viewvc?view=rev&rev=491571
Log:
Added component name.

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

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java?view=diff&rev=491571&r1=491570&r2=491571
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java Mon Jan  1 05:45:17 2007
@@ -49,12 +49,18 @@
     private final Map<String, PropertyValue<?>> properties;
     
     /**
+     * Name of the component.
+     */
+    private String componentName;
+    
+    /**
      * Initializes the property values.
      * @param component Component that is being managed.
      */
     @SuppressWarnings("unchecked")
     public InstrumentedComponent(final Component component) {
         this.properties = component.getDefaultPropertyValues();
+        this.componentName = component.getName();
     }
     
     /**
@@ -78,8 +84,6 @@
             try {
                 list.add(new Attribute(attribute, getAttribute(attribute)));
             } catch(AttributeNotFoundException ex) {
-                // Crap throws clauses in JMX API. why can't getAttributes method
-                // has the same throws clause as getAttribute?
                 throw new InstrumentationException(ex);
             }
         }
@@ -103,7 +107,7 @@
             attributes[i++] = new MBeanAttributeInfo(propertyValue.getName(), Document.class.getName(), null, true, false, false);
         }
         
-        return new MBeanInfo(null, null, attributes, constructors, operations, notifications);
+        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