Title: [975] trunk/core/src/main/java/org/servicemix/jbi/messaging: Removed unused methods and usused objects
Revision
975
Author
gastaldi
Date
2005-11-30 12:02:27 -0500 (Wed, 30 Nov 2005)

Log Message

Removed unused methods and usused objects

Modified Paths


Diff

Modified: trunk/core/src/main/java/org/servicemix/jbi/management/MBeanBuilder.java (974 => 975)

--- trunk/core/src/main/java/org/servicemix/jbi/management/MBeanBuilder.java	2005-11-30 16:52:10 UTC (rev 974)
+++ trunk/core/src/main/java/org/servicemix/jbi/management/MBeanBuilder.java	2005-11-30 17:02:27 UTC (rev 975)
@@ -18,21 +18,10 @@
  **/
 
 package org.servicemix.jbi.management;
-import org.apache.commons.beanutils.PropertyUtilsBean;
-
 import javax.management.DynamicMBean;
-import javax.management.IntrospectionException;
 import javax.management.JMException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanOperationInfo;
-import javax.management.ReflectionException;
 import javax.management.StandardMBean;
 
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Builds a DynamicMBean wrappers for existing objects
  * 
@@ -65,57 +54,4 @@
         }
         return result;
     }
-
-    private static MBeanAttributeInfo[] getAttributes(Object theObject) throws ReflectionException {
-        MBeanAttributeInfo[] result = null;
-        PropertyUtilsBean beanUtil = new PropertyUtilsBean();
-        PropertyDescriptor[] pds = beanUtil.getPropertyDescriptors(theObject);
-        if (pds != null) {
-            result = new MBeanAttributeInfo[pds.length];
-            for (int i = 0;i < pds.length;i++) {
-                try {
-                    result[i] = new MBeanAttributeInfo(pds[i].getName(), pds[i].getShortDescription(), pds[i]
-                            .getReadMethod(), pds[i].getWriteMethod());
-                }
-                catch (IntrospectionException e) {
-                    throw new ReflectionException(e);
-                }
-            }
-        }
-        return result;
-    }
-
-    private static MBeanOperationInfo[] getOperations(MBeanAttributeInfo[] attrs, Object theObject) throws ReflectionException {
-        MBeanOperationInfo[] result = null;
-        Method[] methods = theObject.getClass().getDeclaredMethods();
-        if (methods != null) {
-            List tmpList = new ArrayList();
-            for (int i = 0;i < methods.length;i++) {
-                Method method = methods[i];
-                if (method.isAccessible() && !doesMethodExist(method.getName(), attrs)) {
-                    tmpList.add(method);
-                }
-            }
-            result = new MBeanOperationInfo[tmpList.size()];
-            for (int i = 0;i < tmpList.size();i++) {
-                Method method = (Method) tmpList.get(i);
-                result[i] = new MBeanOperationInfo(method.getName(), method);
-            }
-        }
-        return result;
-    }
-
-    private static boolean doesMethodExist(String name, MBeanAttributeInfo[] attrs) {
-        boolean result = false;
-        if (attrs != null) {
-            for (int i = 0;i < attrs.length;i++) {
-                MBeanAttributeInfo info = attrs[i];
-                if (info.getName().equals(name)) {
-                    result = true;
-                    break;
-                }
-            }
-        }
-        return result;
-    }
 }
\ No newline at end of file

Modified: trunk/core/src/main/java/org/servicemix/jbi/messaging/MessagingStats.java (974 => 975)

--- trunk/core/src/main/java/org/servicemix/jbi/messaging/MessagingStats.java	2005-11-30 16:52:10 UTC (rev 974)
+++ trunk/core/src/main/java/org/servicemix/jbi/messaging/MessagingStats.java	2005-11-30 17:02:27 UTC (rev 975)
@@ -19,12 +19,9 @@
 
 package org.servicemix.jbi.messaging;
 import org.activemq.management.CountStatisticImpl;
-import org.activemq.management.JMSEndpointStatsImpl;
 import org.activemq.management.StatsImpl;
 import org.activemq.management.TimeStatisticImpl;
 import org.activemq.util.IndentPrinter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 /**
  * Basic J2EE stats for the messaging in the NMR
@@ -32,7 +29,6 @@
  * @version $Revision$
  */
 public class MessagingStats extends StatsImpl {
-    private static final Log log = LogFactory.getLog(JMSEndpointStatsImpl.class);
     private String componentName;
     protected CountStatisticImpl inboundExchanges;
     protected CountStatisticImpl outboundExchanges;

Reply via email to