felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r780224 - /felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
Date Sat, 30 May 2009 09:59:53 GMT
Author: clement
Date: Sat May 30 09:59:52 2009
New Revision: 780224

URL: http://svn.apache.org/viewvc?rev=780224&view=rev
Log:
Apply Pierre's patch for the Felix-1183 issue.

Modified:
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java

Modified: felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java?rev=780224&r1=780223&r2=780224&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
(original)
+++ felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
Sat May 30 09:59:52 2009
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -47,7 +47,7 @@
 
 /**
  * This class implements iPOJO DynamicMBean. it builds the dynamic MBean
- * 
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class DynamicMBeanImpl extends NotificationBroadcasterSupport implements
@@ -80,7 +80,7 @@
 
     /**
      * Constructor.
-     * 
+     *
      * @param properties the data extracted from metadat.xml file
      * @param instanceManager the InstanceManager instance
      */
@@ -93,7 +93,7 @@
 
     /**
      * Gets the value of the required attribute.
-     * 
+     *
      * @param arg0 the name of required attribute
      * @throws AttributeNotFoundException if the attribute doesn't exist
      * @throws MBeanException if something bad occures
@@ -113,7 +113,7 @@
 
     /**
      * Gets values of required attributes.
-     * 
+     *
      * @param attributeNames the names of the required attributes
      * @return return the list of the attribute
      */
@@ -139,7 +139,7 @@
 
     /**
      * Returns the MBean Class builded.
-     * 
+     *
      * @return return MBeanInfo class constructed by buildMBeanInfo
      */
     public MBeanInfo getMBeanInfo() {
@@ -148,7 +148,7 @@
 
     /**
      * Invokes the required method on the targeted POJO.
-     * 
+     *
      * @param operationName the name of the method called
      * @param params the parameters given to the method
      * @param signature the determine which method called
@@ -167,27 +167,22 @@
             try {
                 return mc.call(params);
             } catch (NoSuchMethodException e) {
-                System.err.println("No such method!: " + operationName);
-                e.printStackTrace();
+                throw new ReflectionException(e);
             } catch (IllegalAccessException e) {
-                System.err.println("Illegal Access Exception");
-                e.printStackTrace();
+                throw new ReflectionException(e);
             } catch (InvocationTargetException e) {
-                System.err.println("Invocation Target Exception");
-                e.printStackTrace();
+                throw new MBeanException(e);
             }
         } else {
             throw new ReflectionException(new NoSuchMethodException(
                 operationName), "Cannot find the operation " + operationName
                     + " in " + m_className);
         }
-
-        return null;
     }
 
     /**
      * Changes specified attribute value.
-     * 
+     *
      * @param attribute the attribute with new value to be changed
      * @throws AttributeNotFoundException if the required attribute was not found
      * @throws InvalidAttributeValueException if the value is inccorrect type
@@ -254,7 +249,7 @@
 
     /**
      * Changes all the attributes value.
-     * 
+     *
      * @param attributes the list of attribute value to be changed
      * @return the list of new attribute
      */
@@ -301,7 +296,7 @@
         if (m_configMap == null) {
             return;
         }
-        
+
         String dDescription = m_configMap.getDecription();
 
         if (m_configMap.getProperties() != null) {
@@ -363,7 +358,7 @@
 
     /**
      * Gets the notification informations (use by JMX).
-     * 
+     *
      * @return the structure which describe the notifications
      */
     public MBeanNotificationInfo[] getNotificationInfo() {
@@ -387,7 +382,7 @@
 
     /**
      * Sends a notification to a subscriber.
-     * 
+     *
      * @param msg the msg to send
      * @param attributeName the name of the attribute
      * @param attributeType the type of the attribute



Mime
View raw message