activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r565003 [13/17] - in /activemq/trunk: activemq-fileserver/src/main/java/org/apache/activemq/util/ activemq-fileserver/src/test/java/org/apache/activemq/util/ activemq-jaas/src/main/java/org/apache/activemq/jaas/ activemq-jaas/src/test/java/...
Date Sun, 12 Aug 2007 05:27:34 GMT
Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java Sat Aug 11 22:27:21 2007
@@ -16,20 +16,20 @@
  */
 package org.apache.activemq.tool.properties;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.Properties;
 import java.util.List;
-import java.util.ArrayList;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public final class ReflectionUtil {
-    private static final Log log = LogFactory.getLog(ReflectionUtil.class);
+    private static final Log LOG = LogFactory.getLog(ReflectionUtil.class);
 
     private ReflectionUtil() {
     }
@@ -39,7 +39,7 @@
             String debugInfo;
 
             Object target = obj;
-            Class  targetClass = obj.getClass();
+            Class targetClass = obj.getClass();
 
             // DEBUG: Debugging Info
             debugInfo = "Invoking: " + targetClass.getName();
@@ -48,8 +48,9 @@
             String keySubString = key;
             int tokenCount = tokenizer.countTokens();
 
-            // For nested settings, get the object first. -1, do not count the last token
-            for (int j=0; j<tokenCount-1; j++) {
+            // For nested settings, get the object first. -1, do not count the
+            // last token
+            for (int j = 0; j < tokenCount - 1; j++) {
                 // Find getter method first
                 String name = tokenizer.nextToken();
 
@@ -57,20 +58,23 @@
                 if (target instanceof ReflectionConfigurable && !((ReflectionConfigurable)target).acceptConfig(keySubString, val)) {
                     return;
                 } else {
-                    // This will reduce the key, so that it will be recognize by the next object. i.e.
+                    // This will reduce the key, so that it will be recognize by
+                    // the next object. i.e.
                     // Property name: factory.prefetchPolicy.queuePrefetch
-                    // Calling order: this.getFactory().prefetchPolicy().queuePrefetch();
-                    // If factory does not accept the config, it should be given prefetchPolicy.queuePrefetch as the key
-                    keySubString = keySubString.substring(name.length() + 1); // +1 to account for the '.'
+                    // Calling order:
+                    // this.getFactory().prefetchPolicy().queuePrefetch();
+                    // If factory does not accept the config, it should be given
+                    // prefetchPolicy.queuePrefetch as the key
+                    // +1 to account for the '.'
+                    keySubString = keySubString.substring(name.length() + 1);
                 }
 
-                String getMethod = "get" + name.substring(0,1).toUpperCase() + name.substring(1);
+                String getMethod = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
                 Method method = targetClass.getMethod(getMethod, new Class[] {});
                 target = method.invoke(target, null);
                 targetClass = target.getClass();
 
-
-                debugInfo += ("." + getMethod + "()");
+                debugInfo += "." + getMethod + "()";
             }
 
             // Property name
@@ -83,49 +87,75 @@
             // Find setter method
             Method setterMethod = findSetterMethod(targetClass, property);
 
-            // Get the first parameter type. This assumes that there is only one parameter.
+            // Get the first parameter type. This assumes that there is only one
+            // parameter.
             if (setterMethod == null) {
                 throw new IllegalAccessException("Unable to find appropriate setter method signature for property: " + property);
             }
             Class paramType = setterMethod.getParameterTypes()[0];
 
             // Set primitive type
-            debugInfo += ("." + setterMethod + "(" + paramType.getName() + ": " + val + ")");
+            debugInfo += "." + setterMethod + "(" + paramType.getName() + ": " + val + ")";
             if (paramType.isPrimitive()) {
                 if (paramType == Boolean.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Boolean.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Boolean.valueOf(val)
+                    });
                 } else if (paramType == Integer.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Integer.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Integer.valueOf(val)
+                    });
                 } else if (paramType == Long.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Long.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Long.valueOf(val)
+                    });
                 } else if (paramType == Double.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Double.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Double.valueOf(val)
+                    });
                 } else if (paramType == Float.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Float.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Float.valueOf(val)
+                    });
                 } else if (paramType == Short.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Short.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Short.valueOf(val)
+                    });
                 } else if (paramType == Byte.TYPE) {
-                    setterMethod.invoke(target, new Object[] {Byte.valueOf(val)});
+                    setterMethod.invoke(target, new Object[] {
+                        Byte.valueOf(val)
+                    });
                 } else if (paramType == Character.TYPE) {
-                    setterMethod.invoke(target, new Object[] {new Character(val.charAt(0))});
+                    setterMethod.invoke(target, new Object[] {
+                        new Character(val.charAt(0))
+                    });
                 }
             } else {
                 // Set String type
                 if (paramType == String.class) {
-                    setterMethod.invoke(target, new Object[] {val});
+                    setterMethod.invoke(target, new Object[] {
+                        val
+                    });
 
-                // For unknown object type, try to create an instance of the object using a String constructor
+                    // For unknown object type, try to create an instance of the
+                    // object using a String constructor
                 } else {
-                    Constructor c = paramType.getConstructor(new Class[] {String.class});
-                    Object paramObject = c.newInstance(new Object[] {val});
-
-                    setterMethod.invoke(target, new Object[] {paramObject});
+                    Constructor c = paramType.getConstructor(new Class[] {
+                        String.class
+                    });
+                    Object paramObject = c.newInstance(new Object[] {
+                        val
+                    });
+
+                    setterMethod.invoke(target, new Object[] {
+                        paramObject
+                    });
                 }
             }
-            log.debug(debugInfo);
+            LOG.debug(debugInfo);
 
         } catch (Exception e) {
-            log.warn(e);
+            LOG.warn(e);
         }
     }
 
@@ -137,7 +167,8 @@
 
                 configureClass(obj, key, val);
             } catch (Throwable t) {
-                // Let's catch any exception as this could be cause by the foreign class
+                // Let's catch any exception as this could be cause by the
+                // foreign class
                 t.printStackTrace();
             }
         }
@@ -148,7 +179,7 @@
         try {
             props.putAll(retrieveClassProperties("", obj.getClass(), obj));
         } catch (Exception e) {
-            log.warn(e);
+            LOG.warn(e);
         }
         return props;
     }
@@ -159,14 +190,15 @@
         } else {
             Properties props = new Properties();
             Method[] getterMethods = findAllGetterMethods(targetClass);
-            for (int i=0; i<getterMethods.length; i++) {
+            for (int i = 0; i < getterMethods.length; i++) {
                 try {
                     String propertyName = getPropertyName(getterMethods[i].getName());
                     Class retType = getterMethods[i].getReturnType();
 
                     // If primitive or string type, return it
                     if (retType.isPrimitive() || retType == String.class) {
-                        // Check for an appropriate setter method to consider it as a property
+                        // Check for an appropriate setter method to consider it
+                        // as a property
                         if (findSetterMethod(targetClass, propertyName) != null) {
                             Object val = null;
                             try {
@@ -191,7 +223,8 @@
                         }
                     }
                 } catch (Throwable t) {
-                    // Let's catch any exception, cause this could be cause by the foreign class
+                    // Let's catch any exception, cause this could be cause by
+                    // the foreign class
                     t.printStackTrace();
                 }
             }
@@ -200,10 +233,10 @@
     }
 
     private static Method findSetterMethod(Class targetClass, String propertyName) {
-        String methodName = "set" + propertyName.substring(0,1).toUpperCase() + propertyName.substring(1);
+        String methodName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
 
         Method[] methods = targetClass.getMethods();
-        for (int i=0; i<methods.length; i++) {
+        for (int i = 0; i < methods.length; i++) {
             if (methods[i].getName().equals(methodName) && isSetterMethod(methods[i])) {
                 return methods[i];
             }
@@ -212,11 +245,11 @@
     }
 
     private static Method findGetterMethod(Class targetClass, String propertyName) {
-        String methodName1 = "get" + propertyName.substring(0,1).toUpperCase() + propertyName.substring(1);
-        String methodName2 = "is"  + propertyName.substring(0,1).toUpperCase() + propertyName.substring(1);
+        String methodName1 = "get" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
+        String methodName2 = "is" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
 
         Method[] methods = targetClass.getMethods();
-        for (int i=0; i<methods.length; i++) {
+        for (int i = 0; i < methods.length; i++) {
             if ((methods[i].getName().equals(methodName1) || methods[i].getName().equals(methodName2)) && isGetterMethod(methods[i])) {
                 return methods[i];
             }
@@ -228,7 +261,7 @@
         List getterMethods = new ArrayList();
         Method[] methods = targetClass.getMethods();
 
-        for (int i=0; i<methods.length; i++) {
+        for (int i = 0; i < methods.length; i++) {
             if (isGetterMethod(methods[i])) {
                 getterMethods.add(methods[i]);
             }
@@ -243,9 +276,8 @@
         // If 'is' method, must return a boolean value
         // Both must have no parameters
         // Method must not belong to the Object class to prevent infinite loop
-        return (((method.getName().startsWith("is") && method.getReturnType() == Boolean.TYPE) ||
-                 (method.getName().startsWith("get") && method.getReturnType() != Void.TYPE)) &&
-                (method.getParameterTypes().length == 0) && method.getDeclaringClass() != Object.class);
+        return ((method.getName().startsWith("is") && method.getReturnType() == Boolean.TYPE) || (method.getName().startsWith("get") && method.getReturnType() != Void.TYPE))
+               && (method.getParameterTypes().length == 0) && method.getDeclaringClass() != Object.class;
     }
 
     private static boolean isSetterMethod(Method method) {
@@ -254,13 +286,16 @@
             Class[] paramType = method.getParameterTypes();
             // Check that it can only accept one parameter
             if (paramType.length == 1) {
-                // Check if parameter is a primitive or can accept a String parameter
+                // Check if parameter is a primitive or can accept a String
+                // parameter
                 if (paramType[0].isPrimitive() || paramType[0] == String.class) {
                     return true;
                 } else {
                     // Check if object can accept a string as a constructor
                     try {
-                        if (paramType[0].getConstructor(new Class[] {String.class}) != null) {
+                        if (paramType[0].getConstructor(new Class[] {
+                            String.class
+                        }) != null) {
                             return true;
                         }
                     } catch (NoSuchMethodException e) {
@@ -284,6 +319,6 @@
             name = "";
         }
 
-        return name.substring(0,1).toLowerCase() + name.substring(1);
+        return name.substring(0, 1).toLowerCase() + name.substring(1);
     }
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java Sat Aug 11 22:27:21 2007
@@ -16,21 +16,20 @@
  */
 package org.apache.activemq.tool.reports;
 
+import java.util.Map;
+
+import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
 import org.apache.activemq.tool.reports.plugins.ReportPlugin;
 import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-
-import java.util.Map;
 
 public abstract class AbstractPerfReportWriter implements PerformanceReportWriter {
 
     public static final int REPORT_PLUGIN_THROUGHPUT = 0;
-    public static final int REPORT_PLUGIN_CPU        = 1;
-    
+    public static final int REPORT_PLUGIN_CPU = 1;
+
     protected ReportPlugin[] plugins = new ReportPlugin[] {
-                                                new ThroughputReportPlugin(),
-                                                new CpuReportPlugin()
-                                       };
+        new ThroughputReportPlugin(), new CpuReportPlugin()
+    };
 
     protected void handleCsvData(int pluginType, String csvData) {
         plugins[pluginType].handleCsvData(csvData);

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java Sat Aug 11 22:27:21 2007
@@ -19,10 +19,10 @@
 import java.util.Properties;
 
 public interface PerformanceReportWriter {
-    public void openReportWriter();
-    public void closeReportWriter();
-    public void writeInfo(String info);
-    public void writeCsvData(int csvType, String csvData);
-    public void writeProperties(String header, Properties props);
-    public void writeProperties(Properties props);
+    void openReportWriter();
+    void closeReportWriter();
+    void writeInfo(String info);
+    void writeCsvData(int csvType, String csvData);
+    void writeProperties(String header, Properties props);
+    void writeProperties(Properties props);
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java Sat Aug 11 22:27:21 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.tool.reports;
 
-import java.util.List;
 import java.util.Iterator;
+import java.util.List;
 
 public final class PerformanceStatisticsUtil {
     private PerformanceStatisticsUtil() {
@@ -26,7 +26,7 @@
     public static long getSum(List numList) {
         long sum = 0;
         if (numList != null) {
-            for (Iterator i=numList.iterator(); i.hasNext();) {
+            for (Iterator i = numList.iterator(); i.hasNext();) {
                 sum += ((Long)i.next()).longValue();
             }
         } else {
@@ -38,7 +38,7 @@
     public static long getMin(List numList) {
         long min = Long.MAX_VALUE;
         if (numList != null) {
-            for (Iterator i=numList.iterator(); i.hasNext();) {
+            for (Iterator i = numList.iterator(); i.hasNext();) {
                 min = Math.min(((Long)i.next()).longValue(), min);
             }
         } else {
@@ -50,7 +50,7 @@
     public static long getMax(List numList) {
         long max = Long.MIN_VALUE;
         if (numList != null) {
-            for (Iterator i=numList.iterator(); i.hasNext();) {
+            for (Iterator i = numList.iterator(); i.hasNext();) {
                 max = Math.max(((Long)i.next()).longValue(), max);
             }
         } else {
@@ -64,7 +64,7 @@
         if (numList != null) {
             int sampleCount = 0;
             long totalTP = 0;
-            for (Iterator i=numList.iterator(); i.hasNext();) {
+            for (Iterator i = numList.iterator(); i.hasNext();) {
                 sampleCount++;
                 totalTP += ((Long)i.next()).longValue();
             }
@@ -83,7 +83,7 @@
             int sampleCount = 0;
             long totalTP = 0;
             long sampleTP;
-            for (Iterator i=numList.iterator(); i.hasNext();) {
+            for (Iterator i = numList.iterator(); i.hasNext();) {
                 sampleCount++;
                 sampleTP = ((Long)i.next()).longValue();
                 if (sampleTP != minTP && sampleTP != maxTP) {

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java Sat Aug 11 22:27:21 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.tool.reports;
 
-import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-
-import java.util.Properties;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Arrays;
+import java.util.Properties;
+
+import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
+import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
 
 public class VerbosePerfReportWriter extends AbstractPerfReportWriter {
 
@@ -54,7 +54,7 @@
     }
 
     public void writeProperties(Properties props) {
-        for (Iterator i=props.keySet().iterator(); i.hasNext();) {
+        for (Iterator i = props.keySet().iterator(); i.hasNext();) {
             String key = (String)i.next();
             String val = props.getProperty(key, "");
             System.out.println("[PERF-PROP]: " + key + "=" + val);

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java Sat Aug 11 22:27:21 2007
@@ -16,30 +16,31 @@
  */
 package org.apache.activemq.tool.reports;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
-import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
-
-import java.util.Properties;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.io.File;
-import java.io.PrintWriter;
 import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.FileNotFoundException;
 import java.io.BufferedReader;
-import java.io.InputStreamReader;
+import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.activemq.tool.reports.plugins.CpuReportPlugin;
+import org.apache.activemq.tool.reports.plugins.ThroughputReportPlugin;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class XmlFilePerfReportWriter extends AbstractPerfReportWriter {
-    private static final Log log = LogFactory.getLog(XmlFilePerfReportWriter.class);
+
+    private static final Log LOG = LogFactory.getLog(XmlFilePerfReportWriter.class);
 
     private File tempLogFile;
     private PrintWriter tempLogFileWriter;
@@ -50,18 +51,18 @@
     private String reportDir;
     private String reportName;
 
-    private Map  testPropsMap;
-    private List testPropsList;
+    private Map<String, Properties> testPropsMap;
+    private List<Properties> testPropsList;
 
     public XmlFilePerfReportWriter() {
         this("", "PerformanceReport.xml");
     }
 
     public XmlFilePerfReportWriter(String reportDir, String reportName) {
-        this.testPropsMap  = new HashMap();
-        this.testPropsList = new ArrayList();
-        this.reportDir     = reportDir;
-        this.reportName    = reportName;
+        this.testPropsMap = new HashMap<String, Properties>();
+        this.testPropsList = new ArrayList<Properties>();
+        this.reportDir = reportDir;
+        this.reportName = reportName;
     }
 
     public void openReportWriter() {
@@ -141,7 +142,7 @@
     }
 
     protected File createXmlFile() {
-        String filename = (getReportName().endsWith(".xml") ? getReportName() : (getReportName() + ".xml"));
+        String filename = getReportName().endsWith(".xml") ? getReportName() : (getReportName() + ".xml");
         String path = (getReportDir() == null) ? "" : getReportDir();
 
         return new File(path + filename);
@@ -158,7 +159,7 @@
             writeXmlFooter();
             xmlFileWriter.close();
 
-            log.info("Created performance report: " + xmlFile.getAbsolutePath());
+            LOG.info("Created performance report: " + xmlFile.getAbsolutePath());
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -176,15 +177,15 @@
         Properties props;
 
         // Write test settings
-        for (Iterator i=testPropsMap.keySet().iterator(); i.hasNext();) {
-            String key = (String)i.next();
-            props = (Properties)testPropsMap.get(key);
+        for (Iterator<String> i = testPropsMap.keySet().iterator(); i.hasNext();) {
+            String key = i.next();
+            props = testPropsMap.get(key);
             writeMap(key, props);
         }
 
         int count = 1;
-        for (Iterator i=testPropsList.iterator(); i.hasNext();) {
-            props = (Properties)i.next();
+        for (Iterator<Properties> i = testPropsList.iterator(); i.hasNext();) {
+            props = i.next();
             writeMap("settings" + count++, props);
         }
     }
@@ -235,7 +236,9 @@
         xmlFileWriter.println("<property name='perfTpSummary'>");
         xmlFileWriter.println("<props>");
 
-        String val, clientName, clientVal;
+        String val;
+        String clientName;
+        String clientVal;
 
         System.out.println("#########################################");
         System.out.println("####    SYSTEM THROUGHPUT SUMMARY    ####");
@@ -267,49 +270,49 @@
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Min Client Throughput Per Sample: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Max Client Throughput Per Sample: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_TOTAL_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Min Client Total Throughput: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_TOTAL_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_TOTAL_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Max Client Total Throughput: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_TOTAL_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Min Average Client Throughput: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Max Average Client Throughput: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_EMM_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Min Average Client Throughput Excluding Min/Max: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MIN_CLIENT_AVE_EMM_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
         val = (String)summary.get(ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_EMM_TP);
         clientName = val.substring(0, val.indexOf("="));
-        clientVal  = val.substring(val.indexOf("=") + 1);
+        clientVal = val.substring(val.indexOf("=") + 1);
         System.out.println("Max Average Client Throughput Excluding Min/Max: clientName=" + clientName + ", value=" + clientVal);
         xmlFileWriter.println("<prop key='" + ThroughputReportPlugin.KEY_MAX_CLIENT_AVE_EMM_TP + "'>clientName=" + clientName + ",value=" + clientVal + "</prop>");
 
@@ -374,7 +377,7 @@
     protected void writeMap(String name, Map map) {
         xmlFileWriter.println("<property name='" + name + "'>");
         xmlFileWriter.println("<props>");
-        for (Iterator i=map.keySet().iterator(); i.hasNext();) {
+        for (Iterator i = map.keySet().iterator(); i.hasNext();) {
             String propKey = (String)i.next();
             Object propVal = map.get(propKey);
             xmlFileWriter.println("<prop key='" + propKey + "'>" + propVal.toString() + "</prop>");
@@ -388,12 +391,14 @@
         String xmlElement;
 
         xmlElement = "<" + elementName;
-        String data, key, val;
+        String data;
+        String key;
+        String val;
         while (tokenizer.hasMoreTokens()) {
             data = tokenizer.nextToken();
-            key  = data.substring(0, data.indexOf("="));
-            val  = data.substring(data.indexOf("=") + 1);
-            xmlElement += (" " + key + "='" + val + "'");
+            key = data.substring(0, data.indexOf("="));
+            val = data.substring(data.indexOf("=") + 1);
+            xmlElement += " " + key + "='" + val + "'";
         }
         xmlElement += " />";
         xmlFileWriter.println(xmlElement);

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java Sat Aug 11 22:27:21 2007
@@ -16,18 +16,17 @@
  */
 package org.apache.activemq.tool.reports.plugins;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
-
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.List;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class CpuReportPlugin implements ReportPlugin {
-    private static final Log log = LogFactory.getLog(CpuReportPlugin.class);
 
     public static final String NAME_IGNORE_LIST = "$index$timeUnit$r$b$w$swpd$inact$active$free$buff$cache$si$so$in$";
     public static final String NAME_BLOCK_RECV = "bi";
@@ -54,17 +53,21 @@
     public static final String KEY_AVE_IDLE_TIME  = "AveIdleTime";
     public static final String KEY_AVE_WAIT_TIME  = "AveWaitingTime";
 
-    protected List blockRecv = new ArrayList();
-    protected List blockSent = new ArrayList();
-    protected List ctxSwitch = new ArrayList();
-    protected List userTime  = new ArrayList();
-    protected List sysTime   = new ArrayList();
-    protected List idleTime  = new ArrayList();
-    protected List waitTime  = new ArrayList();
+    private static final Log LOG = LogFactory.getLog(CpuReportPlugin.class);
+
+    protected List<Long> blockRecv = new ArrayList<Long>();
+    protected List<Long> blockSent = new ArrayList<Long>();
+    protected List<Long> ctxSwitch = new ArrayList<Long>();
+    protected List<Long> userTime  = new ArrayList<Long>();
+    protected List<Long> sysTime   = new ArrayList<Long>();
+    protected List<Long> idleTime  = new ArrayList<Long>();
+    protected List<Long> waitTime  = new ArrayList<Long>();
 
     public void handleCsvData(String csvData) {
         StringTokenizer tokenizer = new StringTokenizer(csvData, ",");
-        String data, key, val;
+        String data;
+        String key;
+        String val;
         while (tokenizer.hasMoreTokens()) {
             data = tokenizer.nextToken();
             key  = data.substring(0, data.indexOf("="));
@@ -74,10 +77,10 @@
         }
     }
 
-    public Map getSummary() {
+    public Map<String, String> getSummary() {
         long val;
 
-        Map summary = new HashMap();
+        Map<String, String> summary = new HashMap<String, String>();
 
         if (blockRecv.size() > 0) {
             val = PerformanceStatisticsUtil.getSum(blockRecv);
@@ -146,7 +149,7 @@
         } else if (NAME_IGNORE_LIST.indexOf("$" + key + "$") != -1) {
             // Ignore key
         } else {
-            log.warn("Unrecognized CPU data. " + key + "=" + val);
+            LOG.warn("Unrecognized CPU data. " + key + "=" + val);
         }
     }
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java Sat Aug 11 22:27:21 2007
@@ -19,6 +19,6 @@
 import java.util.Map;
 
 public interface ReportPlugin {
-    public void handleCsvData(String csvData);
-    public Map getSummary();
+    void handleCsvData(String csvData);
+    Map getSummary();
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java Sat Aug 11 22:27:21 2007
@@ -16,22 +16,22 @@
  */
 package org.apache.activemq.tool.reports.plugins;
 
-import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
-
-import java.util.Map;
+import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.StringTokenizer;
+import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
+import java.util.Map;
 import java.util.Set;
-import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import org.apache.activemq.tool.reports.PerformanceStatisticsUtil;
 
 public class ThroughputReportPlugin implements ReportPlugin {
-    public static final String KEY_SYS_TOTAL_TP          = "SystemTotalTP";
-    public static final String KEY_SYS_TOTAL_CLIENTS     = "SystemTotalClients";
-    public static final String KEY_SYS_AVE_TP            = "SystemAveTP";
-    public static final String KEY_SYS_AVE_EMM_TP        = "SystemAveEMMTP";
-    public static final String KEY_SYS_AVE_CLIENT_TP     = "SystemAveClientTP";
+    public static final String KEY_SYS_TOTAL_TP = "SystemTotalTP";
+    public static final String KEY_SYS_TOTAL_CLIENTS = "SystemTotalClients";
+    public static final String KEY_SYS_AVE_TP = "SystemAveTP";
+    public static final String KEY_SYS_AVE_EMM_TP = "SystemAveEMMTP";
+    public static final String KEY_SYS_AVE_CLIENT_TP = "SystemAveClientTP";
     public static final String KEY_SYS_AVE_CLIENT_EMM_TP = "SystemAveClientEMMTP";
     public static final String KEY_MIN_CLIENT_TP = "MinClientTP";
     public static final String KEY_MAX_CLIENT_TP = "MaxClientTP";
@@ -46,12 +46,15 @@
 
     public void handleCsvData(String csvData) {
         StringTokenizer tokenizer = new StringTokenizer(csvData, ",");
-        String data, key, val, clientName = null;
+        String data;
+        String key;
+        String val;
+        String clientName = null;
         Long throughput = null;
         while (tokenizer.hasMoreTokens()) {
             data = tokenizer.nextToken();
-            key  = data.substring(0, data.indexOf("="));
-            val  = data.substring(data.indexOf("=") + 1);
+            key = data.substring(0, data.indexOf("="));
+            val = data.substring(data.indexOf("=") + 1);
 
             if (key.equalsIgnoreCase("clientName")) {
                 clientName = val;
@@ -70,35 +73,35 @@
             return new HashMap<String, String>();
         }
 
-        long   minClientTP = Long.MAX_VALUE, // TP = throughput
-               maxClientTP = Long.MIN_VALUE,
-               minClientTotalTP = Long.MAX_VALUE,
-               maxClientTotalTP = Long.MIN_VALUE,
-               systemTotalTP = 0;
-
-        double minClientAveTP = Double.MAX_VALUE,
-               maxClientAveTP = Double.MIN_VALUE,
-               minClientAveEMMTP = Double.MAX_VALUE, // EMM = Excluding Min/Max
-               maxClientAveEMMTP = Double.MIN_VALUE,
-               systemAveTP = 0.0,
-               systemAveEMMTP = 0.0;
-
-        String nameMinClientTP = "",
-               nameMaxClientTP = "",
-               nameMinClientTotalTP = "",
-               nameMaxClientTotalTP = "",
-               nameMinClientAveTP = "",
-               nameMaxClientAveTP = "",
-               nameMinClientAveEMMTP = "",
-               nameMaxClientAveEMMTP = "";
+        long minClientTP = Long.MAX_VALUE; // TP = throughput
+        long maxClientTP = Long.MIN_VALUE;
+        long minClientTotalTP = Long.MAX_VALUE;
+        long maxClientTotalTP = Long.MIN_VALUE;
+        long systemTotalTP = 0;
+
+        double minClientAveTP = Double.MAX_VALUE;
+        double maxClientAveTP = Double.MIN_VALUE;
+        double minClientAveEMMTP = Double.MAX_VALUE; // EMM = Excluding Min/Max
+        double maxClientAveEMMTP = Double.MIN_VALUE;
+        double systemAveTP = 0.0;
+        double systemAveEMMTP = 0.0;
+
+        String nameMinClientTP = "";
+        String nameMaxClientTP = "";
+        String nameMinClientTotalTP = "";
+        String nameMaxClientTotalTP = "";
+        String nameMinClientAveTP = "";
+        String nameMaxClientAveTP = "";
+        String nameMinClientAveEMMTP = "";
+        String nameMaxClientAveEMMTP = "";
 
         Set<String> clientNames = clientThroughputs.keySet();
         String clientName;
-        List   clientTPList;
+        List clientTPList;
         long tempLong;
         double tempDouble;
         int clientCount = 0;
-        for (Iterator<String> i=clientNames.iterator(); i.hasNext();) {
+        for (Iterator<String> i = clientNames.iterator(); i.hasNext();) {
             clientName = i.next();
             clientTPList = clientThroughputs.get(clientName);
             clientCount++;
@@ -140,7 +143,8 @@
             }
 
             tempDouble = PerformanceStatisticsUtil.getAveEx(clientTPList);
-            systemAveEMMTP += tempDouble; // Accumulate ave throughput excluding min/max
+            systemAveEMMTP += tempDouble; // Accumulate ave throughput
+                                            // excluding min/max
             if (tempDouble < minClientAveEMMTP) {
                 minClientAveEMMTP = tempDouble;
                 nameMinClientAveEMMTP = clientName;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/AbstractPerformanceSampler.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,69 +16,69 @@
  */
 package org.apache.activemq.tool.sampler;
 
-import org.apache.activemq.tool.reports.PerformanceReportWriter;
-import org.apache.activemq.tool.properties.AbstractObjectProperties;
-
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.activemq.tool.properties.AbstractObjectProperties;
+import org.apache.activemq.tool.reports.PerformanceReportWriter;
+
 public abstract class AbstractPerformanceSampler extends AbstractObjectProperties implements PerformanceSampler {
-	protected long rampUpTime   = 30 * 1000; // 30 secs
-	protected long rampDownTime = 30 * 1000; // 30 secs
-	protected long duration     = 5 * 60 * 1000; // 5 mins
-	protected long interval     = 1000; // 1 sec
-	protected PerformanceReportWriter perfReportWriter = null;
-	protected PerformanceEventListener perfEventListener = null;
-	protected final AtomicBoolean isRunning = new AtomicBoolean(false);
-
-	protected long sampleIndex = 0;
-
-	public long getRampUpTime() {
-		return rampUpTime;
-	}
-
-	public void setRampUpTime(long rampUpTime) {
-		this.rampUpTime = rampUpTime;
-	}
-
-	public long getRampDownTime() {
-		return rampDownTime;
-	}
-
-	public void setRampDownTime(long rampDownTime) {
-		this.rampDownTime = rampDownTime;
-	}
-
-	public long getDuration() {
-		return duration;
-	}
-
-	public void setDuration(long duration) {
-		this.duration = duration;
-	}
-
-	public long getInterval() {
-		return interval;
-	}
-
-	public void setInterval(long interval) {
-		this.interval = interval;
-	}
-
-	public PerformanceReportWriter getPerfReportWriter() {
-		return perfReportWriter;
-	}
-
-	public void setPerfReportWriter(PerformanceReportWriter perfReportWriter) {
-		this.perfReportWriter = perfReportWriter;
-	}
-
-	public PerformanceEventListener getPerfEventListener() {
-		return perfEventListener;
-	}
-
-	public void setPerfEventListener(PerformanceEventListener perfEventListener) {
-		this.perfEventListener = perfEventListener;
-	}
+    
+    protected long rampUpTime = 30 * 1000; // 30 secs
+    protected long rampDownTime = 30 * 1000; // 30 secs
+    protected long duration = 5 * 60 * 1000; // 5 mins
+    protected long interval = 1000; // 1 sec
+    protected PerformanceReportWriter perfReportWriter;
+    protected PerformanceEventListener perfEventListener;
+    protected final AtomicBoolean isRunning = new AtomicBoolean(false);
+    protected long sampleIndex;
+
+    public long getRampUpTime() {
+        return rampUpTime;
+    }
+
+    public void setRampUpTime(long rampUpTime) {
+        this.rampUpTime = rampUpTime;
+    }
+
+    public long getRampDownTime() {
+        return rampDownTime;
+    }
+
+    public void setRampDownTime(long rampDownTime) {
+        this.rampDownTime = rampDownTime;
+    }
+
+    public long getDuration() {
+        return duration;
+    }
+
+    public void setDuration(long duration) {
+        this.duration = duration;
+    }
+
+    public long getInterval() {
+        return interval;
+    }
+
+    public void setInterval(long interval) {
+        this.interval = interval;
+    }
+
+    public PerformanceReportWriter getPerfReportWriter() {
+        return perfReportWriter;
+    }
+
+    public void setPerfReportWriter(PerformanceReportWriter perfReportWriter) {
+        this.perfReportWriter = perfReportWriter;
+    }
+
+    public PerformanceEventListener getPerfEventListener() {
+        return perfEventListener;
+    }
+
+    public void setPerfEventListener(PerformanceEventListener perfEventListener) {
+        this.perfEventListener = perfEventListener;
+    }
 
     public void startSampler() {
         isRunning.set(true);
@@ -90,7 +90,7 @@
         try {
             onRampUpStart();
             if (perfEventListener != null) {
-            	perfEventListener.onRampUpStart(this);
+                perfEventListener.onRampUpStart(this);
             }
 
             try {
@@ -101,14 +101,14 @@
 
             onSamplerStart();
             if (perfEventListener != null) {
-            	perfEventListener.onSamplerStart(this);
+                perfEventListener.onSamplerStart(this);
             }
 
             sample();
 
             onSamplerEnd();
             if (perfEventListener != null) {
-            	perfEventListener.onSamplerEnd(this);
+                perfEventListener.onSamplerEnd(this);
             }
 
             try {
@@ -119,7 +119,7 @@
 
             onRampDownEnd();
             if (perfEventListener != null) {
-            	perfEventListener.onRampDownEnd(this);
+                perfEventListener.onRampDownEnd(this);
             }
         } finally {
             isRunning.set(false);
@@ -127,7 +127,7 @@
                 isRunning.notifyAll();
             }
         }
-	}
+    }
 
     protected void sample() {
         // Compute for the actual duration window of the sampler
@@ -147,11 +147,11 @@
     public abstract void sampleData();
 
     public boolean isRunning() {
-		return isRunning.get();
-	}
+        return isRunning.get();
+    }
 
-	public void waitUntilDone() {
-		while (isRunning()) {
+    public void waitUntilDone() {
+        while (isRunning()) {
             try {
                 synchronized (isRunning) {
                     isRunning.wait(0);
@@ -160,11 +160,18 @@
                 e.printStackTrace();
             }
         }
-	}
+    }
 
     // Call back functions to customize behavior of thread.
-    protected void onRampUpStart() {}
-    protected void onSamplerStart() {}
-    protected void onSamplerEnd() {}
-    protected void onRampDownEnd() {}
+    protected void onRampUpStart() {
+    }
+
+    protected void onSamplerStart() {
+    }
+
+    protected void onSamplerEnd() {
+    }
+
+    protected void onRampDownEnd() {
+    }
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/CpuSamplerTask.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.tool.sampler;
 
+import java.io.IOException;
+
+import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
 import org.apache.activemq.tool.sampler.plugins.CpuSamplerPlugin;
 import org.apache.activemq.tool.sampler.plugins.LinuxCpuSamplerPlugin;
-import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
-
-import java.io.IOException;
 
 public class CpuSamplerTask extends AbstractPerformanceSampler {
 
-    private CpuSamplerPlugin plugin = null;
+    private CpuSamplerPlugin plugin;
 
     public void createPlugin() throws IOException {
         createPlugin(System.getProperty("os.name"));

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java Sat Aug 11 22:27:21 2007
@@ -17,7 +17,9 @@
 package org.apache.activemq.tool.sampler;
 
 public interface MeasurableClient {
-    public void   reset();
-    public String getClientName();
-    public long   getThroughput();
+    
+    void reset();
+    String getClientName();
+    long getThroughput();
+    
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceEventListener.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,9 +16,12 @@
  */
 package org.apache.activemq.tool.sampler;
 
-public interface PerformanceEventListener {
-	public void onRampUpStart(PerformanceSampler sampler);
-	public void onSamplerStart(PerformanceSampler sampler);
-	public void onSamplerEnd(PerformanceSampler sampler);
-	public void onRampDownEnd(PerformanceSampler sampler);
+interface PerformanceEventListener {
+    void onRampUpStart(PerformanceSampler sampler);
+
+    void onSamplerStart(PerformanceSampler sampler);
+
+    void onSamplerEnd(PerformanceSampler sampler);
+
+    void onRampDownEnd(PerformanceSampler sampler);
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/PerformanceSampler.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,20 +19,34 @@
 import org.apache.activemq.tool.reports.PerformanceReportWriter;
 
 public interface PerformanceSampler extends Runnable {
-	public long getRampUpTime();
-	public void setRampUpTime(long rampUpTime);
-	public long getRampDownTime();
-	public void setRampDownTime(long rampDownTime);
-	public long getDuration();
-	public void setDuration(long duration);
-	public long getInterval();
-	public void setInterval(long interval);
-	public PerformanceReportWriter getPerfReportWriter();
-	public void setPerfReportWriter(PerformanceReportWriter writer);
-	public PerformanceEventListener getPerfEventListener();
-	public void setPerfEventListener(PerformanceEventListener listener);
-
-	public void sampleData();
-	public boolean isRunning();
-	public void waitUntilDone();
+    
+    long getRampUpTime();
+
+    void setRampUpTime(long rampUpTime);
+
+    long getRampDownTime();
+
+    void setRampDownTime(long rampDownTime);
+
+    long getDuration();
+
+    void setDuration(long duration);
+
+    long getInterval();
+
+    void setInterval(long interval);
+
+    PerformanceReportWriter getPerfReportWriter();
+
+    void setPerfReportWriter(PerformanceReportWriter writer);
+
+    PerformanceEventListener getPerfEventListener();
+
+    void setPerfEventListener(PerformanceEventListener listener);
+
+    void sampleData();
+
+    boolean isRunning();
+
+    void waitUntilDone();
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,16 +16,16 @@
  */
 package org.apache.activemq.tool.sampler;
 
-import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.activemq.tool.reports.AbstractPerfReportWriter;
+
 public class ThroughputSamplerTask extends AbstractPerformanceSampler {
 
     private final Object mutex = new Object();
-    private List clients = new ArrayList();
+    private List<MeasurableClient> clients = new ArrayList<MeasurableClient>();
 
     public void registerClient(MeasurableClient client) {
         synchronized (mutex) {
@@ -33,22 +33,21 @@
         }
     }
 
-	public void sampleData() {
-		for (Iterator i = clients.iterator(); i.hasNext();) {
-            MeasurableClient client = (MeasurableClient) i.next();
+    public void sampleData() {
+        for (Iterator<MeasurableClient> i = clients.iterator(); i.hasNext();) {
+            MeasurableClient client = i.next();
             if (perfReportWriter != null) {
-            	perfReportWriter.writeCsvData(AbstractPerfReportWriter.REPORT_PLUGIN_THROUGHPUT,
-                        "index=" + sampleIndex + ",clientName=" + client.getClientName() +
-                        ",throughput=" + client.getThroughput());
+                perfReportWriter.writeCsvData(AbstractPerfReportWriter.REPORT_PLUGIN_THROUGHPUT, "index=" + sampleIndex + ",clientName=" + client.getClientName() + ",throughput="
+                                                                                                 + client.getThroughput());
             }
             client.reset();
         }
-	}
+    }
 
     protected void onSamplerStart() {
         // Reset the throughput of the clients
-        for (Iterator i = clients.iterator(); i.hasNext();) {
-            MeasurableClient client = (MeasurableClient) i.next();
+        for (Iterator<MeasurableClient> i = clients.iterator(); i.hasNext();) {
+            MeasurableClient client = i.next();
             client.reset();
         }
     }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/CpuSamplerPlugin.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,21 +17,24 @@
 package org.apache.activemq.tool.sampler.plugins;
 
 public interface CpuSamplerPlugin {
-	public final static String WINDOWS_2000 = "Windows 2000";
-	public final static String WINDOWS_NT   = "Windows NT";
-	public final static String WINDOWS_XP   = "Windows XP";
-	public final static String WINDOWS_95   = "Windows 95";
-	public final static String WINDOWS_CE   = "Windows CE";
-	public final static String LINUX        = "Linux";
-	public final static String SOLARIS      = "Solaris";
-	public final static String AIX          = "AIX";
-	public final static String FREEBSD      = "FreeBSD";
-	public final static String MAC_OS       = "Mac OS";
-	public final static String MAC_OS_X     = "Mac OS X";
-	public final static String POWERPC      = "PowerPC";
-	public final static String OS_2         = "OS/2";
+    
+    String WINDOWS_2000 = "Windows 2000";
+    String WINDOWS_NT = "Windows NT";
+    String WINDOWS_XP = "Windows XP";
+    String WINDOWS_95 = "Windows 95";
+    String WINDOWS_CE = "Windows CE";
+    String LINUX = "Linux";
+    String SOLARIS = "Solaris";
+    String AIX = "AIX";
+    String FREEBSD = "FreeBSD";
+    String MAC_OS = "Mac OS";
+    String MAC_OS_X = "Mac OS X";
+    String POWERPC = "PowerPC";
+    String OS_2 = "OS/2";
 
-	public String getCpuUtilizationStats();
-    public void start();
-    public void stop();
+    String getCpuUtilizationStats();
+
+    void start();
+
+    void stop();
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/plugins/LinuxCpuSamplerPlugin.java Sat Aug 11 22:27:21 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,12 +16,11 @@
  */
 package org.apache.activemq.tool.sampler.plugins;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-
 import java.io.BufferedReader;
-import java.io.InputStreamReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.StringTokenizer;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public class LinuxCpuSamplerPlugin implements CpuSamplerPlugin, Runnable {
 
@@ -87,23 +86,23 @@
         return data;
     }
 
-	public String getVmstat() {
-		return vmstat;
-	}
-
-	public void setVmstat(String vmstat) {
-		this.vmstat = vmstat;
-	}
+    public String getVmstat() {
+        return vmstat;
+    }
+
+    public void setVmstat(String vmstat) {
+        this.vmstat = vmstat;
+    }
 
     protected String convertToCSV(String header, String data) {
-		StringTokenizer headerTokens = new StringTokenizer(header, " ");
-		StringTokenizer dataTokens   = new StringTokenizer(data, " ");
+        StringTokenizer headerTokens = new StringTokenizer(header, " ");
+        StringTokenizer dataTokens = new StringTokenizer(data, " ");
 
-		String csv = "";
-		while (headerTokens.hasMoreTokens()) {
-			csv += (headerTokens.nextToken() + "=" + dataTokens.nextToken() + ",");
-		}
+        String csv = "";
+        while (headerTokens.hasMoreTokens()) {
+            csv += headerTokens.nextToken() + "=" + dataTokens.nextToken() + ",";
+        }
 
-		return csv;
-	}
+        return csv;
+    }
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java Sat Aug 11 22:27:21 2007
@@ -16,10 +16,11 @@
  */
 package org.apache.activemq.tool.spi;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
+import java.util.Properties;
 
 import javax.jms.ConnectionFactory;
-import java.util.Properties;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
 
 public class ActiveMQPojoSPI implements SPIConnectionFactory {
     public static final String KEY_BROKER_URL        = "brokerUrl";

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java Sat Aug 11 22:27:21 2007
@@ -16,22 +16,23 @@
  */
 package org.apache.activemq.tool.spi;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.jms.ConnectionFactory;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.List;
-import java.util.ArrayList;
 import java.io.File;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import javax.jms.ConnectionFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public abstract class ClassLoaderSPIConnectionFactory implements SPIConnectionFactory {
-    private static final Log log = LogFactory.getLog(ClassLoaderSPIConnectionFactory.class);
 
     public static final String KEY_EXT_DIR = "extDir";
+    private static final Log LOG = LogFactory.getLog(ClassLoaderSPIConnectionFactory.class);
 
     public final ConnectionFactory createConnectionFactory(Properties settings) throws Exception {
 
@@ -46,30 +47,30 @@
         String extDir = (String)settings.remove(KEY_EXT_DIR);
         if (extDir != null) {
             StringTokenizer tokens = new StringTokenizer(extDir, ";,");
-            List urls = new ArrayList();
+            List<URL> urls = new ArrayList<URL>();
             while (tokens.hasMoreTokens()) {
                 String dir = tokens.nextToken();
                 try {
                     File f = new File(dir);
                     if (!f.exists()) {
-                        log.warn("Cannot find extension dir: " + f.getAbsolutePath());
+                        LOG.warn("Cannot find extension dir: " + f.getAbsolutePath());
                     } else {
-                        log.info("Adding extension dir: " + f.getAbsolutePath());
+                        LOG.info("Adding extension dir: " + f.getAbsolutePath());
 
                         urls.add(f.toURL());
 
                         File[] files = f.listFiles();
-                        if( files!=null ) {
+                        if (files != null) {
                             for (int j = 0; j < files.length; j++) {
-                                if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar") ) {
-                                    log.info("Adding extension dir: " + files[j].getAbsolutePath());
+                                if (files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")) {
+                                    LOG.info("Adding extension dir: " + files[j].getAbsolutePath());
                                     urls.add(files[j].toURL());
                                 }
                             }
                         }
                     }
                 } catch (Exception e) {
-                    log.warn("Failed to load ext dir: " + dir + ". Reason: " + e);
+                    LOG.warn("Failed to load ext dir: " + dir + ". Reason: " + e);
                 }
             }
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java Sat Aug 11 22:27:21 2007
@@ -16,10 +16,11 @@
  */
 package org.apache.activemq.tool.spi;
 
-import org.apache.activemq.tool.properties.ReflectionUtil;
+import java.util.Properties;
 
 import javax.jms.ConnectionFactory;
-import java.util.Properties;
+
+import org.apache.activemq.tool.properties.ReflectionUtil;
 
 public abstract class ReflectionSPIConnectionFactory extends ClassLoaderSPIConnectionFactory {
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java Sat Aug 11 22:27:21 2007
@@ -16,10 +16,14 @@
  */
 package org.apache.activemq.tool.spi;
 
-import javax.jms.ConnectionFactory;
 import java.util.Properties;
 
+import javax.jms.ConnectionFactory;
+
 public interface SPIConnectionFactory {
-    public ConnectionFactory createConnectionFactory(Properties settings) throws Exception;
-    public void configureConnectionFactory(ConnectionFactory jmsFactory, Properties settings) throws Exception;
+    
+    ConnectionFactory createConnectionFactory(Properties settings) throws Exception;
+
+    void configureConnectionFactory(ConnectionFactory jmsFactory, Properties settings) throws Exception;
+    
 }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java Sat Aug 11 22:27:21 2007
@@ -16,13 +16,12 @@
  */
 package org.apache.activemq.tool;
 
-import junit.framework.TestCase;
-
-import java.util.Properties;
 import java.io.File;
+import java.util.Properties;
 
-import org.apache.activemq.tool.properties.ReflectionUtil;
+import junit.framework.TestCase;
 import org.apache.activemq.tool.properties.ReflectionConfigurable;
+import org.apache.activemq.tool.properties.ReflectionUtil;
 
 public class ReflectionUtilTest extends TestCase {
     public void testConfigurableOption() {
@@ -186,8 +185,8 @@
 
     public class TestClass1 {
         private boolean booleanData;
-        private int     intData;
-        private long    longData;
+        private int intData;
+        private long longData;
 
         public boolean isBooleanData() {
             return booleanData;
@@ -215,9 +214,9 @@
     }
 
     public class TestClass2 extends TestClass1 {
-        private float   floatData;
-        private byte    byteData;
-        private char    charData;
+        private float floatData;
+        private byte byteData;
+        private char charData;
 
         public float getFloatData() {
             return floatData;
@@ -245,9 +244,9 @@
     }
 
     public class TestClass3 extends TestClass2 {
-        private short   shortData;
-        private double  doubleData;
-        private String  stringData;
+        private short shortData;
+        private double doubleData;
+        private String stringData;
         private TestClass3 testData;
 
         public short getShortData() {
@@ -296,9 +295,9 @@
     }
 
     public class TestClass5 implements ReflectionConfigurable {
-        public boolean intercepted = false;
+        public boolean intercepted;
         public boolean willIntercept = true;
-        public TestClass5 nest = null;
+        public TestClass5 nest;
 
         public void configureProperties(Properties props) {
             // Do nothing
@@ -324,8 +323,8 @@
     }
 
     public class TestClass6 {
-        public TestClass6 nestNotConfig = null;
-        public TestClass5 nestConfig = null;
+        public TestClass6 nestNotConfig;
+        public TestClass5 nestConfig;
 
         public TestClass6 getNestNotConfig() {
             return nestNotConfig;

Modified: activemq/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java Sat Aug 11 22:27:21 2007
@@ -1,3 +1,19 @@
+/**
+ * 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 regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.activemq.maven;
 
 /**
@@ -17,50 +33,51 @@
  * limitations under the License.
  */
 
+import java.util.Properties;
+
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
 
-import java.util.Properties;
-
 /**
  * Goal which starts an activemq broker.
- *
+ * 
  * @goal run
  * @phase process-sources
  */
 public class BrokerMojo extends AbstractMojo {
     /**
-	 * The maven project.
-	 *
-	 * @parameter expression="${project}"
-	 * @required
-	 * @readonly
-	 */
-	protected MavenProject project;
+     * The maven project.
+     * 
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
 
     /**
-     * The broker configuration uri
-     *
-     * The list of currently supported URI syntaxes is described
-     * <a href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">here</a>
-     *
-     * @parameter expression="${configUri}" default-value="broker:(tcp://localhost:61616)?useJmx=false&persistent=false"
+     * The broker configuration uri The list of currently supported URI syntaxes
+     * is described <a
+     * href="http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html">here</a>
+     * 
+     * @parameter expression="${configUri}"
+     *            default-value="broker:(tcp://localhost:61616)?useJmx=false&persistent=false"
      * @required
      */
     private String configUri;
 
     /**
      * Indicates whether to fork the broker, useful for integration tests.
-     *
+     * 
      * @parameter expression="${fork}" default-value="false"
      */
     private boolean fork;
 
     /**
      * System properties to add
+     * 
      * @parameter expression="${systemProperties}"
      */
     private Properties systemProperties;
@@ -93,22 +110,25 @@
 
     /**
      * Wait for a shutdown invocation elsewhere
+     * 
      * @throws Exception
      */
     protected void waitForShutdown(BrokerService broker) throws Exception {
-        final boolean[] shutdown = new boolean[] {false};
+        final boolean[] shutdown = new boolean[] {
+            false
+        };
         Runtime.getRuntime().addShutdownHook(new Thread() {
             public void run() {
-                synchronized(shutdown) {
-                    shutdown[0]=true;
+                synchronized (shutdown) {
+                    shutdown[0] = true;
                     shutdown.notify();
                 }
             }
         });
 
         // Wait for any shutdown event
-        synchronized(shutdown) {
-            while( !shutdown[0] ) {
+        synchronized (shutdown) {
+            while (!shutdown[0]) {
                 try {
                     shutdown.wait();
                 } catch (InterruptedException e) {

Modified: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java (original)
+++ activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java Sat Aug 11 22:27:21 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.web;
 
+import java.util.Collection;
+
 import org.apache.activemq.broker.jmx.BrokerViewMBean;
 import org.apache.activemq.broker.jmx.QueueViewMBean;
 import org.apache.activemq.broker.jmx.TopicViewMBean;
 import org.apache.activemq.command.ActiveMQDestination;
-
-import java.util.Collection;
 
 /**
  * A facade for either a local in JVM broker or a remote broker over JMX

Modified: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java (original)
+++ activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java Sat Aug 11 22:27:21 2007
@@ -16,21 +16,22 @@
  */
 package org.apache.activemq.web;
 
-import org.apache.activemq.broker.jmx.BrokerViewMBean;
-import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
-import org.apache.activemq.broker.jmx.ManagementContext;
-import org.apache.activemq.broker.jmx.TopicViewMBean;
-import org.apache.activemq.broker.jmx.QueueViewMBean;
-import org.apache.activemq.broker.jmx.DestinationViewMBean;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.List;
 import java.util.Iterator;
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+
+import org.apache.activemq.broker.jmx.BrokerViewMBean;
+import org.apache.activemq.broker.jmx.DestinationViewMBean;
+import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
+import org.apache.activemq.broker.jmx.ManagementContext;
+import org.apache.activemq.broker.jmx.QueueViewMBean;
+import org.apache.activemq.broker.jmx.TopicViewMBean;
 
 /**
  * A useful base class for an implementation of {@link BrokerFacade}
@@ -40,7 +41,7 @@
 public abstract class BrokerFacadeSupport implements BrokerFacade {
     public abstract ManagementContext getManagementContext();
 
-    public Collection getQueues() throws Exception {
+    public Collection<Object> getQueues() throws Exception {
         BrokerViewMBean broker = getBrokerAdmin();
         if (broker == null) {
             return Collections.EMPTY_LIST;
@@ -49,7 +50,7 @@
         return getManagedObjects(queues, QueueViewMBean.class);
     }
 
-    public Collection getTopics() throws Exception {
+    public Collection<Object> getTopics() throws Exception {
         BrokerViewMBean broker = getBrokerAdmin();
         if (broker == null) {
             return Collections.EMPTY_LIST;
@@ -58,7 +59,7 @@
         return getManagedObjects(queues, TopicViewMBean.class);
     }
 
-    public Collection getDurableTopicSubscribers() throws Exception {
+    public Collection<Object> getDurableTopicSubscribers() throws Exception {
         BrokerViewMBean broker = getBrokerAdmin();
         if (broker == null) {
             return Collections.EMPTY_LIST;
@@ -75,8 +76,8 @@
         return (TopicViewMBean) getDestinationByName(getTopics(), name);
     }
 
-    protected DestinationViewMBean getDestinationByName(Collection collection, String name) {
-        Iterator iter = collection.iterator();
+    protected DestinationViewMBean getDestinationByName(Collection<Object> collection, String name) {
+        Iterator<Object> iter = collection.iterator();
         while (iter.hasNext()) {
             DestinationViewMBean destinationViewMBean = (DestinationViewMBean) iter.next();
             if (name.equals(destinationViewMBean.getName())) {
@@ -86,8 +87,8 @@
         return null;
     }
 
-    protected Collection getManagedObjects(ObjectName[] names, Class type) {
-        List answer = new ArrayList();
+    protected Collection<Object> getManagedObjects(ObjectName[] names, Class type) {
+        List<Object> answer = new ArrayList<Object>();
         MBeanServer mbeanServer = getManagementContext().getMBeanServer();
         if (mbeanServer != null) {
             for (int i = 0; i < names.length; i++) {



Mime
View raw message