activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r565003 [12/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-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java (original)
+++ activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java Sat Aug 11 22:27:21 2007
@@ -35,175 +35,178 @@
 import javax.resource.spi.work.WorkManager;
 
 import junit.framework.TestCase;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ra.ActiveMQManagedConnection;
-import org.apache.activemq.ra.ActiveMQManagedConnectionFactory;
-import org.apache.activemq.ra.ActiveMQResourceAdapter;
-import org.apache.activemq.ra.ManagedConnectionProxy;
-
 
 /**
  * @version $Revision$
  */
 public class ManagedConnectionTest extends TestCase {
-    
-    
+
     private static final String DEFAULT_HOST = "vm://localhost";
-    
+
     private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
     private ActiveMQManagedConnectionFactory managedConnectionFactory;
     private ConnectionFactory connectionFactory;
     private ManagedConnectionProxy connection;
     private ActiveMQManagedConnection managedConnection;
-    
+
     /**
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
-        
-    	ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter(); 
-    	adapter.setServerUrl(DEFAULT_HOST);
-    	adapter.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
-    	adapter.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
-    	adapter.start(new BootstrapContext(){
-			public WorkManager getWorkManager() {
-				return null;
-			}
-			public XATerminator getXATerminator() {
-				return null;
-			}
-
-			public Timer createTimer() throws UnavailableException {
-				return null;
-			}
-		});
-    	
+
+        ActiveMQResourceAdapter adapter = new ActiveMQResourceAdapter();
+        adapter.setServerUrl(DEFAULT_HOST);
+        adapter.setUserName(ActiveMQConnectionFactory.DEFAULT_USER);
+        adapter.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
+        adapter.start(new BootstrapContext() {
+            public WorkManager getWorkManager() {
+                return null;
+            }
+
+            public XATerminator getXATerminator() {
+                return null;
+            }
+
+            public Timer createTimer() throws UnavailableException {
+                return null;
+            }
+        });
+
         managedConnectionFactory = new ActiveMQManagedConnectionFactory();
         managedConnectionFactory.setResourceAdapter(adapter);
-    	    	
-        connectionFactory = (ConnectionFactory) managedConnectionFactory.createConnectionFactory(connectionManager);
-        connection = (ManagedConnectionProxy) connectionFactory.createConnection();
+
+        connectionFactory = (ConnectionFactory)managedConnectionFactory.createConnectionFactory(connectionManager);
+        connection = (ManagedConnectionProxy)connectionFactory.createConnection();
         managedConnection = connection.getManagedConnection();
-        
+
     }
-    
+
     public void testConnectionCloseEvent() throws ResourceException, JMSException {
-        
-        final boolean test[] = new boolean[]{false};
+
+        final boolean test[] = new boolean[] {
+            false
+        };
         connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-                public void connectionClosed(ConnectionEvent arg0) {
-                    test[0]=true;
-                }
-            });
+            public void connectionClosed(ConnectionEvent arg0) {
+                test[0] = true;
+            }
+        });
         connection.close();
-        assertTrue( test[0] );
+        assertTrue(test[0]);
     }
-    
+
     public void testLocalTransactionCommittedEvent() throws ResourceException, JMSException {
 
-        final boolean test[] = new boolean[]{false};
+        final boolean test[] = new boolean[] {
+            false
+        };
         connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-                public void localTransactionCommitted(ConnectionEvent arg0) {
-                    test[0]=true;
-                }
-            });
-        
+            public void localTransactionCommitted(ConnectionEvent arg0) {
+                test[0] = true;
+            }
+        });
+
         managedConnection.getLocalTransaction().begin();
-        Session session = connection.createSession(true,0);
-        
+        Session session = connection.createSession(true, 0);
+
         doWork(session);
         session.commit();
-        
-        assertTrue( test[0] );
-        
+
+        assertTrue(test[0]);
+
     }
-    
+
     public void testLocalTransactionRollbackEvent() throws ResourceException, JMSException {
-        
-        final boolean test[] = new boolean[]{false};
+
+        final boolean test[] = new boolean[] {
+            false
+        };
         connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-	            public void localTransactionRolledback(ConnectionEvent arg0) {
-	                test[0]=true;
-	            }
-            });
+            public void localTransactionRolledback(ConnectionEvent arg0) {
+                test[0] = true;
+            }
+        });
         managedConnection.getLocalTransaction().begin();
-        Session session = connection.createSession(true,0);
+        Session session = connection.createSession(true, 0);
         doWork(session);
         session.rollback();
-        
-        assertTrue( test[0] );
-    }    
+
+        assertTrue(test[0]);
+    }
 
     public void testLocalTransactionStartedEvent() throws ResourceException, JMSException {
-        
-        final boolean test[] = new boolean[]{false};
+
+        final boolean test[] = new boolean[] {
+            false
+        };
         connectionManager.addConnectionEventListener(new ConnectionEventListenerAdapter() {
-                public void localTransactionStarted(ConnectionEvent arg0) {
-                    test[0]=true;
-                }
-            });
-        
-        // Begin the transaction...  that should kick off the event.
+            public void localTransactionStarted(ConnectionEvent arg0) {
+                test[0] = true;
+            }
+        });
+
+        // Begin the transaction... that should kick off the event.
         managedConnection.getLocalTransaction().begin();
-	    Session session = connection.createSession(true,0);
+        Session session = connection.createSession(true, 0);
         doWork(session);
-        
-        assertTrue( test[0] );
+
+        assertTrue(test[0]);
     }
 
     /**
-     * A managed connection that has been clean up should throw exceptions
-     * when it used.
+     * A managed connection that has been clean up should throw exceptions when
+     * it used.
      */
     public void testCleanup() throws ResourceException, JMSException {
-        
+
         // Do some work and close it...
-	    Session session = connection.createSession(true,0);
+        Session session = connection.createSession(true, 0);
         doWork(session);
         connection.close();
         try {
-	        // This should throw expection        
-	        doWork(session);
-	        fail("Using a session after the connection is closed should throw exception.");
-        } catch ( JMSException e) {
+            // This should throw expection
+            doWork(session);
+            fail("Using a session after the connection is closed should throw exception.");
+        } catch (JMSException e) {
         }
     }
 
     public void testSessionCloseIndependance() throws ResourceException, JMSException {
-        
-	    Session session1 = connection.createSession(true,0);
-	    Session session2 = connection.createSession(true,0);
-        assertTrue( session1!=session2 );
-	    
-	    doWork(session1);
+
+        Session session1 = connection.createSession(true, 0);
+        Session session2 = connection.createSession(true, 0);
+        assertTrue(session1 != session2);
+
+        doWork(session1);
         session1.close();
-        try {        	
-	        // This should throw expection
-	        doWork(session1);
-	        fail("Using a session after the connection is closed should throw exception.");
-        } catch ( JMSException e) {
+        try {
+            // This should throw expection
+            doWork(session1);
+            fail("Using a session after the connection is closed should throw exception.");
+        } catch (JMSException e) {
         }
-        
+
         // Make sure that closing session 1 does not close session 2
         doWork(session2);
         session2.close();
-        try {        	
-	        // This should throw expection
-	        doWork(session2);
-	        fail("Using a session after the connection is closed should throw exception.");
-        } catch ( JMSException e) {
+        try {
+            // This should throw expection
+            doWork(session2);
+            fail("Using a session after the connection is closed should throw exception.");
+        } catch (JMSException e) {
         }
     }
 
     /**
      * Does some work so that we can test commit/rollback etc.
+     * 
      * @throws JMSException
      */
     public void doWork(Session session) throws JMSException {
-	    Queue t = session.createQueue("TEST");
-	    MessageProducer producer = session.createProducer(t);
-	    producer.send(session.createTextMessage("test message."));
+        Queue t = session.createQueue("TEST");
+        MessageProducer producer = session.createProducer(t);
+        producer.send(session.createTextMessage("test message."));
     }
 
     public void testImplementsQueueAndTopicConnection() throws Exception {
@@ -218,7 +221,7 @@
     }
 
     public void testSamePropertiesButNotEqual() throws Exception {
-        ManagedConnectionProxy newConnection = (ManagedConnectionProxy) connectionFactory.createConnection();
+        ManagedConnectionProxy newConnection = (ManagedConnectionProxy)connectionFactory.createConnection();
         assertNonEquality(managedConnection, newConnection.getManagedConnection());
     }
 

Modified: activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java (original)
+++ activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java Sat Aug 11 22:27:21 2007
@@ -16,17 +16,15 @@
  */
 package org.apache.activemq.ra;
 
-import org.apache.activemq.ra.ActiveMQEndpointWorker;
-import org.apache.activemq.ra.InvalidMessageEndpointException;
-import org.apache.activemq.ra.MessageEndpointProxy;
-import org.jmock.MockObjectTestCase;
-import org.jmock.Mock;
+import java.lang.reflect.Method;
 
-import javax.jms.MessageListener;
 import javax.jms.Message;
-import javax.resource.spi.endpoint.MessageEndpoint;
+import javax.jms.MessageListener;
 import javax.resource.ResourceException;
-import java.lang.reflect.Method;
+import javax.resource.spi.endpoint.MessageEndpoint;
+
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
 
 /**
  * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>

Modified: activemq/trunk/activemq-test-atomikos/src/test/java/org/apache/activemq/atomikos/XATest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-test-atomikos/src/test/java/org/apache/activemq/atomikos/XATest.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-test-atomikos/src/test/java/org/apache/activemq/atomikos/XATest.java (original)
+++ activemq/trunk/activemq-test-atomikos/src/test/java/org/apache/activemq/atomikos/XATest.java Sat Aug 11 22:27:21 2007
@@ -16,11 +16,6 @@
  */
 package org.apache.activemq.atomikos;
 
-import com.atomikos.datasource.xa.DefaultXidFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.ActiveMQXAConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
 import javax.jms.MessageConsumer;
 import javax.jms.XAConnection;
 import javax.jms.XASession;
@@ -28,7 +23,11 @@
 import javax.transaction.xa.Xid;
 
 import junit.framework.TestCase;
+import com.atomikos.datasource.xa.DefaultXidFactory;
 
+import org.apache.activemq.ActiveMQXAConnectionFactory;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQQueue;
 
 /**
  * @version $Revision$
@@ -36,11 +35,10 @@
 public class XATest extends TestCase {
 
     public void testXA() throws Exception {
-		BrokerService broker = new BrokerService();
-		broker.addConnector("tcp://localhost:61616");
-		broker.start();
-		
-	
+        BrokerService broker = new BrokerService();
+        broker.addConnector("tcp://localhost:61616");
+        broker.start();
+
         String url = "tcp://localhost:61616";
         String qName = "MyQueue";
         int timeout = 5;

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java Sat Aug 11 22:27:21 2007
@@ -1,5 +1,3 @@
-package org.apache.activemq.maven;
-
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,27 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.activemq.maven;
 
-
+import org.apache.activemq.tool.JMSMemtest;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.activemq.tool.JMSMemtest;
-
-import javax.jms.JMSException;
-
 
 /**
- * Goal which does a memory usage test  to check for any memory leak
- *
+ * Goal which does a memory usage test to check for any memory leak
+ * 
  * @goal memtest
  * @phase process-sources
  */
-public class MemtestMojo
-        extends AbstractMojo {
+public class MemtestMojo extends AbstractMojo {
 
     /**
-     * @parameter expression="${url} 
-     *
+     * @parameter expression="${url}
      */
     private String url;
 
@@ -47,7 +40,7 @@
     private String topic;
 
     /**
-     * @parameter expression="${connectionCheckpointSize}"  default-value="-1"
+     * @parameter expression="${connectionCheckpointSize}" default-value="-1"
      * @required
      */
     private String connectionCheckpointSize;
@@ -70,7 +63,6 @@
      */
     private String prefetchSize;
 
-
     /**
      * @parameter expression="${consumerCount}" default-value="1"
      * @required
@@ -102,44 +94,29 @@
     private String destinationName;
 
     /**
-     * @parameter expression="${reportName}" default-value="activemq-memory-usage-report"
+     * @parameter expression="${reportName}"
+     *            default-value="activemq-memory-usage-report"
      * @required
      */
     private String reportName;
 
     /**
-     * @parameter expression="${reportDirectory}" default-value="${project.build.directory}/test-memtest"
+     * @parameter expression="${reportDirectory}"
+     *            default-value="${project.build.directory}/test-memtest"
      * @required
      */
     private String reportDirectory;
 
-
-
-    public void execute()
-            throws MojoExecutionException {
+    public void execute() throws MojoExecutionException {
 
         JMSMemtest.main(createArgument());
     }
 
-
-
     public String[] createArgument() {
-
-
         String[] options = {
-            "url=" + url,
-            "topic=" + topic,
-            "durable=" + durable,
-            "connectionCheckpointSize=" + connectionCheckpointSize,
-            "producerCount=" + producerCount,
-            "consumerCount=" + consumerCount,
-            "messageCount=" + messageCount,
-            "messageSize=" + messageSize,
-            "checkpointInterval=" + checkpointInterval,
-            "destinationName=" + destinationName,
-            "reportName=" + reportName,
-            "prefetchSize=" + prefetchSize,
-            "reportDirectory=" + reportDirectory,
+            "url=" + url, "topic=" + topic, "durable=" + durable, "connectionCheckpointSize=" + connectionCheckpointSize, "producerCount=" + producerCount, "consumerCount=" + consumerCount,
+            "messageCount=" + messageCount, "messageSize=" + messageSize, "checkpointInterval=" + checkpointInterval, "destinationName=" + destinationName, "reportName=" + reportName,
+            "prefetchSize=" + prefetchSize, "reportDirectory=" + reportDirectory,
         };
         return options;
     }

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java Sat Aug 11 22:27:21 2007
@@ -17,29 +17,32 @@
 
 package org.apache.activemq.tool;
 
+import java.util.Properties;
+
+import javax.jms.BytesMessage;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.tool.MemProducer;
-import org.apache.activemq.tool.MemConsumer;
-import org.apache.activemq.tool.MemoryMonitoringTool;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.jms.*;
-
-
-import java.util.Properties;
-
 
 public class JMSMemtest {
 
-    private static final Log log = LogFactory.getLog(JMSMemtest.class);
+    private static final Log LOG = LogFactory.getLog(JMSMemtest.class);
     private static final int DEFAULT_MESSAGECOUNT = 5000;
+    
     protected BrokerService broker;
     protected boolean topic = true;
-    protected boolean durable = false;
-
-    protected long messageCount = 0;
+    protected boolean durable;
+    protected long messageCount;
 
     //  how large the message in kb before we close/start the producer/consumer with a new connection.  -1 means no connectionCheckpointSize
     protected int connectionCheckpointSize;
@@ -73,10 +76,27 @@
 
     protected boolean createConnectionPerClient = true;
 
-    protected boolean transacted = false;
+    protected boolean transacted;
     protected boolean useEmbeddedBroker = true;
     protected MemoryMonitoringTool memoryMonitoringTool;
 
+    public JMSMemtest(Properties settings) {
+        url = settings.getProperty("url");
+        topic = new Boolean(settings.getProperty("topic")).booleanValue();
+        durable = new Boolean(settings.getProperty("durable")).booleanValue();
+        connectionCheckpointSize = new Integer(settings.getProperty("connectionCheckpointSize")).intValue();
+        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
+        consumerCount = new Integer(settings.getProperty("consumerCount")).intValue();
+        messageCount = new Integer(settings.getProperty("messageCount")).intValue();
+        messageSize = new Integer(settings.getProperty("messageSize")).intValue();
+        prefetchSize = new Integer(settings.getProperty("prefetchSize")).intValue();
+        checkpointInterval = new Integer(settings.getProperty("checkpointInterval")).intValue() * 1000;
+        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
+        reportName = settings.getProperty("reportName");
+        destinationName = settings.getProperty("destinationName");
+        reportDirectory = settings.getProperty("reportDirectory");
+        connectionInterval = connectionCheckpointSize * 1024;
+    }
 
     public static void main(String[] args) {
 
@@ -103,27 +123,8 @@
 
     }
 
-
-    public JMSMemtest(Properties settings) {
-        url = settings.getProperty("url");
-        topic = new Boolean(settings.getProperty("topic")).booleanValue();
-        durable = new Boolean(settings.getProperty("durable")).booleanValue();
-        connectionCheckpointSize = new Integer(settings.getProperty("connectionCheckpointSize")).intValue();
-        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
-        consumerCount = new Integer(settings.getProperty("consumerCount")).intValue();
-        messageCount = new Integer(settings.getProperty("messageCount")).intValue();
-        messageSize = new Integer(settings.getProperty("messageSize")).intValue();
-        prefetchSize = new Integer(settings.getProperty("prefetchSize")).intValue();
-        checkpointInterval = new Integer(settings.getProperty("checkpointInterval")).intValue() * 1000;
-        producerCount = new Integer(settings.getProperty("producerCount")).intValue();
-        reportName = settings.getProperty("reportName");
-        destinationName = settings.getProperty("destinationName");
-        reportDirectory = settings.getProperty("reportDirectory");
-        connectionInterval = connectionCheckpointSize * 1024;
-    }
-
     protected void start() throws Exception {
-        log.info("Starting Monitor");
+        LOG.info("Starting Monitor");
         memoryMonitoringTool = new MemoryMonitoringTool();
         memoryMonitoringTool.setTestSettings(getSysTestSettings());
         Thread monitorThread = memoryMonitoringTool.startMonitor();
@@ -159,7 +160,7 @@
 
         publishAndConsume();
 
-        log.info("Closing resources");
+        LOG.info("Closing resources");
         this.close();
 
         monitorThread.join();
@@ -184,9 +185,9 @@
         createProducers();
         int counter = 0;
         boolean resetCon = false;
-        log.info("Start sending messages ");
+        LOG.info("Start sending messages ");
         for (int i = 0; i < messageCount; i++) {
-            if (resetCon == true) {
+            if (resetCon) {
                 closeConsumers();
                 closeProducers();
                 createConsumers();
@@ -287,8 +288,8 @@
 
     protected Properties getSysTestSettings() {
         Properties settings = new Properties();
-        settings.setProperty("domain", topic == true ? "topic" : "queue");
-        settings.setProperty("durable", durable == true ? "durable" : "non-durable");
+        settings.setProperty("domain", topic ? "topic" : "queue");
+        settings.setProperty("durable", durable ? "durable" : "non-durable");
         settings.setProperty("connection_checkpoint_size_kb", new Integer(connectionCheckpointSize).toString());
         settings.setProperty("producer_count", new Integer(producerCount).toString());
         settings.setProperty("consumer_count", new Integer(consumerCount).toString());

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java Sat Aug 11 22:27:21 2007
@@ -16,18 +16,27 @@
  */
 package org.apache.activemq.tool;
 
-import org.apache.activemq.tool.MemMessageIdList;
-
-import javax.jms.*;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Session;
+import javax.jms.Topic;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class MemConsumer extends MemMessageIdList implements MessageListener {
+
+    static long ctr;
+
     protected Connection connection;
     protected MessageConsumer consumer;
-    protected long counter = 0;
-    protected boolean isParent = false;
+    protected long counter;
+    protected boolean isParent;
     protected boolean inOrder = true;
 
 
@@ -70,8 +79,6 @@
     public Message receive(long wait) throws JMSException {
         return consumer.receive(wait);
     }
-
-    static long ctr = 0;
 
     public void onMessage(Message msg) {
         super.onMessage(msg);

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java Sat Aug 11 22:27:21 2007
@@ -23,7 +23,6 @@
 import javax.jms.Message;
 import javax.jms.MessageListener;
 
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -41,9 +40,9 @@
  */
 public class MemMessageIdList implements MessageListener {
 
-    protected static final Log log = LogFactory.getLog(MemMessageIdList.class);
+    protected static final Log LOG = LogFactory.getLog(MemMessageIdList.class);
 
-    private List messageIds = new ArrayList();
+    private List<String> messageIds = new ArrayList<String>();
     private Object semaphore;
     private boolean verbose;
     private MessageListener parent;
@@ -80,17 +79,17 @@
     /**
      * @return all the messages on the list so far, clearing the buffer
      */
-    public List flushMessages() {
+    public List<String> flushMessages() {
         synchronized (semaphore) {
-            List answer = new ArrayList(messageIds);
+            List<String> answer = new ArrayList<String>(messageIds);
             messageIds.clear();
             return answer;
         }
     }
 
-    public synchronized List getMessageIds() {
+    public synchronized List<String> getMessageIds() {
         synchronized (semaphore) {
-            return new ArrayList(messageIds);
+            return new ArrayList<String>(messageIds);
         }
     }
 
@@ -103,7 +102,7 @@
                 semaphore.notifyAll();
             }
             if (verbose) {
-                log.info("Received message: " + message);
+                LOG.info("Received message: " + message);
             }
         } catch (JMSException e) {
             e.printStackTrace();
@@ -120,7 +119,7 @@
     }
 
     public void waitForMessagesToArrive(int messageCount) {
-        log.info("Waiting for " + messageCount + " message(s) to arrive");
+        LOG.info("Waiting for " + messageCount + " message(s) to arrive");
 
         long start = System.currentTimeMillis();
 
@@ -137,12 +136,12 @@
                     semaphore.wait(maximumDuration - duration);
                 }
             } catch (InterruptedException e) {
-                log.info("Caught: " + e);
+                LOG.info("Caught: " + e);
             }
         }
         long end = System.currentTimeMillis() - start;
 
-        log.info("End of wait for " + end + " millis and received: " + getMessageCount() + " messages");
+        LOG.info("End of wait for " + end + " millis and received: " + getMessageCount() + " messages");
     }
 
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java Sat Aug 11 22:27:21 2007
@@ -16,27 +16,21 @@
  */
 package org.apache.activemq.tool;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-
-
 import java.io.DataOutputStream;
-import java.util.Properties;
-import java.lang.management.MemoryMXBean;
 import java.lang.management.ManagementFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
+import java.lang.management.MemoryMXBean;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public class MemoryMonitoringTool implements Runnable {
 
-    private long checkpointInterval = 5000;          // 5 sec sample checkpointInterval
-    private long resultIndex = 0;
-
-    private AtomicBoolean isRunning = new AtomicBoolean(false);
-    private DataOutputStream dataDoutputStream = null;
-
     protected Properties testSettings = new Properties();
     protected ReportGenerator reportGenerator = new ReportGenerator();
+
+    private long checkpointInterval = 5000;          // 5 sec sample checkpointInterval
+    private long resultIndex;
+    private AtomicBoolean isRunning = new AtomicBoolean(false);
+    private DataOutputStream dataDoutputStream;
     private MemoryMXBean memoryBean;
 
     public Properties getTestSettings() {
@@ -128,7 +122,12 @@
                 nonHeapMB = memoryBean.getNonHeapMemoryUsage().getUsed() / oneMB;
                 heapMB = memoryBean.getHeapMemoryUsage().getUsed() / oneMB;
 
-                reportGenerator.writeWithIndent(6, "<memory_usage index=" + resultIndex + " non_heap_mb=" + nonHeapMB + " non_heap_bytes=" + memoryBean.getNonHeapMemoryUsage().getUsed() + " heap_mb=" + heapMB + " heap_bytes=" + memoryBean.getHeapMemoryUsage().getUsed() + "/>");
+                reportGenerator.writeWithIndent(6, "<memory_usage index=" + resultIndex 
+                                                + " non_heap_mb=" + nonHeapMB 
+                                                + " non_heap_bytes=" 
+                                                + memoryBean.getNonHeapMemoryUsage().getUsed() 
+                                                + " heap_mb=" + heapMB 
+                                                + " heap_bytes=" + memoryBean.getHeapMemoryUsage().getUsed() + "/>");
 
                 resultIndex++;
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java Sat Aug 11 22:27:21 2007
@@ -17,9 +17,6 @@
 
 package org.apache.activemq.tool;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -27,12 +24,16 @@
 import java.util.Enumeration;
 import java.util.Properties;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 public class ReportGenerator {
-    private static final Log log = LogFactory.getLog(ReportGenerator.class);
-    private String reportDirectory = null;
-    private String reportName = null;
-    private PrintWriter writer = null;
-    private File reportFile = null;
+    
+    private static final Log LOG = LogFactory.getLog(ReportGenerator.class);
+    private String reportDirectory;
+    private String reportName;
+    private PrintWriter writer;
+    private File reportFile;
     private Properties testSettings;
 
     public ReportGenerator() {
@@ -45,7 +46,6 @@
 
     public void startGenerateReport() {
 
-
         File reportDir = new File(getReportDirectory());
 
         // Create output directory if it doesn't exist.
@@ -53,7 +53,6 @@
             reportDir.mkdirs();
         }
 
-
         if (reportDir != null) {
             reportFile = new File(this.getReportDirectory() + File.separator + this.getReportName() + ".xml");
         }
@@ -61,7 +60,8 @@
         try {
             this.writer = new PrintWriter(new FileOutputStream(reportFile));
         } catch (IOException e1) {
-            e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            e1.printStackTrace(); // To change body of catch statement use
+                                    // File | Settings | File Templates.
         }
     }
 
@@ -69,8 +69,7 @@
         writeWithIndent(0, "</test-report>");
         this.getWriter().flush();
         this.getWriter().close();
-        log.info(" TEST REPORT OUTPUT : " + reportFile.getAbsolutePath());
-
+        LOG.info(" TEST REPORT OUTPUT : " + reportFile.getAbsolutePath());
 
     }
 
@@ -84,7 +83,6 @@
 
     }
 
-
     protected void addClientSettings() {
         if (this.getTestSettings() != null) {
             Enumeration keys = getTestSettings().propertyNames();
@@ -93,7 +91,7 @@
 
             String key;
             while (keys.hasMoreElements()) {
-                key = (String) keys.nextElement();
+                key = (String)keys.nextElement();
                 writeWithIndent(6, "<" + key + ">" + getTestSettings().get(key) + "</" + key + ">");
             }
 
@@ -115,7 +113,6 @@
         writeWithIndent(2, "</test-result>");
     }
 
-
     protected void writeWithIndent(int indent, String result) {
         StringBuffer buffer = new StringBuffer();
 
@@ -131,7 +128,6 @@
         return this.writer;
     }
 
-
     public String getReportDirectory() {
         return reportDirectory;
     }
@@ -143,7 +139,6 @@
     public String getReportName() {
         return reportName;
     }
-
 
     public void setReportName(String reportName) {
         this.reportName = reportName;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java Sat Aug 11 22:27:21 2007
@@ -16,31 +16,27 @@
  */
 package org.apache.activemq.maven;
 
-import org.apache.activemq.tool.JmsConsumerSystem;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-import java.util.Properties;
+import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
+import java.util.Properties;
 import java.util.Set;
-import java.util.HashSet;
+
+import org.apache.activemq.tool.JmsConsumerSystem;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
 
 /**
  * Goal which touches a timestamp file.
- *
+ * 
  * @goal consumer
  * @phase process-sources
  */
 public class ConsumerMojo extends AbstractMojo {
 
     private String[] validPrefix = {
-        "sysTest.",
-        "factory.",
-        "consumer.",
-        "tpSampler.",
-        "cpuSampler."
+        "sysTest.", "factory.", "consumer.", "tpSampler.", "cpuSampler."
     };
 
     public void execute() throws MojoExecutionException {
@@ -52,7 +48,7 @@
         Properties sysProps = System.getProperties();
         Set keys = new HashSet(sysProps.keySet());
 
-        for (Iterator i=keys.iterator(); i.hasNext();) {
+        for (Iterator i = keys.iterator(); i.hasNext();) {
             String key = (String)i.next();
             if (isRecognizedProperty(key)) {
                 args.add(key + "=" + sysProps.remove(key));
@@ -62,7 +58,7 @@
     }
 
     protected boolean isRecognizedProperty(String key) {
-        for (int j=0; j<validPrefix.length; j++) {
+        for (int j = 0; j < validPrefix.length; j++) {
             if (key.startsWith(validPrefix[j])) {
                 return true;
             }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java Sat Aug 11 22:27:21 2007
@@ -16,31 +16,27 @@
  */
 package org.apache.activemq.maven;
 
-import org.apache.activemq.tool.JmsProducerSystem;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Properties;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
 import java.util.Set;
-import java.util.HashSet;
+
+import org.apache.activemq.tool.JmsProducerSystem;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
 
 /**
  * Goal which touches a timestamp file.
- *
+ * 
  * @goal producer
  * @phase process
  */
 public class ProducerMojo extends AbstractMojo {
 
     private String[] validPrefix = {
-        "sysTest.",
-        "factory.",
-        "producer.",
-        "tpSampler.",
-        "cpuSampler."
+        "sysTest.", "factory.", "producer.", "tpSampler.", "cpuSampler."
     };
 
     public void execute() throws MojoExecutionException {
@@ -52,7 +48,7 @@
         Properties sysProps = System.getProperties();
         Set keys = new HashSet(sysProps.keySet());
 
-        for (Iterator i=keys.iterator(); i.hasNext();) {
+        for (Iterator i = keys.iterator(); i.hasNext();) {
             String key = (String)i.next();
             if (isRecognizedProperty(key)) {
                 args.add(key + "=" + sysProps.remove(key));
@@ -62,7 +58,7 @@
     }
 
     protected boolean isRecognizedProperty(String key) {
-        for (int j=0; j<validPrefix.length; j++) {
+        for (int j = 0; j < validPrefix.length; j++) {
             if (key.startsWith(validPrefix[j])) {
                 return true;
             }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java Sat Aug 11 22:27:21 2007
@@ -16,10 +16,6 @@
  */
 package org.apache.activemq.maven;
 
-import org.apache.activemq.console.Main;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -27,16 +23,20 @@
 import java.nio.MappedByteBuffer;
 import java.nio.channels.FileChannel;
 
+import org.apache.activemq.console.Main;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
 /**
  * Goal which starts activemq broker.
- *
+ * 
  * @goal broker
  * @phase process-sources
  */
 public class ServerMojo extends AbstractMojo {
     /**
      * Location of the output directory. Defaults to target.
-     *
+     * 
      * @parameter expression="${project.build.directory}"
      * @required
      */
@@ -44,15 +44,16 @@
 
     /**
      * Location of the predefined config files.
-     *
-     * @parameter expression="${configDirectory}" default-value="${basedir}/src/main/resources/broker-conf"
+     * 
+     * @parameter expression="${configDirectory}"
+     *            default-value="${basedir}/src/main/resources/broker-conf"
      * @required
      */
     private String configDirectory;
 
     /**
      * Type of activemq configuration to use. This is also the filename used.
-     *
+     * 
      * @parameter expression="${configType}" default-value="activemq"
      * @required
      */
@@ -60,20 +61,19 @@
 
     /**
      * Location of activemq config file other those found in resources/config.
-     *
+     * 
      * @parameter expression="${configFile}"
      */
     private File configFile;
 
     /**
      * Broker URL.
-     *
+     * 
      * @parameter expression="${url}"
      */
     private String url;
 
-    public void execute()
-            throws MojoExecutionException {
+    public void execute() throws MojoExecutionException {
 
         File out = outputDirectory;
 
@@ -84,8 +84,8 @@
 
         String[] args = new String[2];
         if (url != null) {
-           args[0] = "start";
-           args[1] = url;
+            args[0] = "start";
+            args[1] = url;
         } else {
             File config;
             if (configFile != null) {
@@ -100,23 +100,23 @@
             } catch (IOException e) {
                 throw new MojoExecutionException(e.getMessage());
             }
-           args[0] = "start";
-           args[1] =  "xbean:" + (config.toURI()).toString();
+            args[0] = "start";
+            args[1] = "xbean:" + (config.toURI()).toString();
         }
 
-
         Main.main(args);
     }
 
     /**
      * Copy activemq configuration file to output directory.
-     *
+     * 
      * @param source
      * @return
      * @throws IOException
      */
     public File copy(File source) throws IOException {
-        FileChannel in = null, out = null;
+        FileChannel in = null;
+        FileChannel out = null;
 
         File dest = new File(outputDirectory.getAbsolutePath() + File.separator + "activemq.xml");
 
@@ -130,8 +130,12 @@
             out.write(buf);
 
         } finally {
-            if (in != null) in.close();
-            if (out != null) out.close();
+            if (in != null) {
+                in.close();
+            }
+            if (out != null) {
+                out.close();
+            }
         }
 
         return dest;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java Sat Aug 11 22:27:21 2007
@@ -16,33 +16,35 @@
  */
 package org.apache.activemq.tool;
 
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Session;
+
 import org.apache.activemq.tool.properties.JmsClientProperties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.jms.ConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.JMSException;
-import javax.jms.Destination;
-import java.util.Enumeration;
-
 public abstract class AbstractJmsClient {
-    private static final Log log = LogFactory.getLog(AbstractJmsClient.class);
+
+    private static final Log LOG = LogFactory.getLog(AbstractJmsClient.class);
 
     protected ConnectionFactory factory;
     protected Connection jmsConnection;
     protected Session jmsSession;
 
-    protected int destCount = 1, destIndex = 0;
+    protected int destCount = 1;
+    protected int destIndex;
     protected String clientName = "";
 
     public AbstractJmsClient(ConnectionFactory factory) {
         this.factory = factory;
     }
 
-    abstract public JmsClientProperties getClient();
-    abstract public void setClient(JmsClientProperties client);
+    public abstract JmsClientProperties getClient();
+
+    public abstract void setClient(JmsClientProperties client);
 
     public ConnectionFactory getFactory() {
         return factory;
@@ -80,7 +82,7 @@
         if (jmsConnection == null) {
             jmsConnection = factory.createConnection();
             jmsConnection.setClientID(getClientName());
-            log.info("Creating JMS Connection: Provider=" + getClient().getJmsProvider() + ", JMS Spec=" + getClient().getJmsVersion());
+            LOG.info("Creating JMS Connection: Provider=" + getClient().getJmsProvider() + ", JMS Spec=" + getClient().getJmsVersion());
         }
         return jmsConnection;
     }
@@ -107,10 +109,12 @@
     public Destination[] createDestination(int destIndex, int destCount) throws JMSException {
 
         if (getClient().isDestComposite()) {
-            return new Destination[] {createCompositeDestination(getClient().getDestName(), destIndex, destCount)};
+            return new Destination[] {
+                createCompositeDestination(getClient().getDestName(), destIndex, destCount)
+            };
         } else {
             Destination[] dest = new Destination[destCount];
-            for (int i=0; i<destCount; i++) {
+            for (int i = 0; i < destCount; i++) {
                 dest[i] = createDestination(getClient().getDestName() + "." + (destIndex + i));
             }
 
@@ -136,10 +140,11 @@
 
         int i;
         compDestName = name + "." + destIndex + ","; // First destination
-        for (i=1; i<destCount-1; i++) {
-            compDestName += (simpleName + "." + (destIndex + i) +",");
+        for (i = 1; i < destCount - 1; i++) {
+            compDestName += simpleName + "." + (destIndex + i) + ",";
         }
-        compDestName += (simpleName + "." + (destIndex + i)); // Last destination (minus the comma)
+        // Last destination (minus the comma)
+        compDestName += simpleName + "." + (destIndex + i);
 
         return createDestination(compDestName);
     }

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java Sat Aug 11 22:27:21 2007
@@ -16,42 +16,44 @@
  */
 package org.apache.activemq.tool;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-import org.apache.activemq.tool.sampler.CpuSamplerTask;
-import org.apache.activemq.tool.reports.PerformanceReportWriter;
-import org.apache.activemq.tool.reports.XmlFilePerfReportWriter;
-import org.apache.activemq.tool.reports.VerbosePerfReportWriter;
-import org.apache.activemq.tool.properties.JmsClientSystemProperties;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.ConnectionMetaData;
+import javax.jms.JMSException;
+
 import org.apache.activemq.tool.properties.AbstractObjectProperties;
+import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.properties.JmsClientSystemProperties;
 import org.apache.activemq.tool.properties.JmsFactoryProperties;
 import org.apache.activemq.tool.properties.ReflectionUtil;
-import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.reports.PerformanceReportWriter;
+import org.apache.activemq.tool.reports.VerbosePerfReportWriter;
+import org.apache.activemq.tool.reports.XmlFilePerfReportWriter;
+import org.apache.activemq.tool.sampler.CpuSamplerTask;
+import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
 import org.apache.activemq.tool.spi.SPIConnectionFactory;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.ConnectionMetaData;
-import java.util.Properties;
-import java.util.Enumeration;
-import java.io.IOException;
-import java.io.File;
-import java.io.FileInputStream;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public abstract class AbstractJmsClientSystem extends AbstractObjectProperties {
-    private static final Log log = LogFactory.getLog(AbstractJmsClientSystem.class);
-
-    private int clientDestIndex, clientDestCount;
+    private static final Log LOG = LogFactory.getLog(AbstractJmsClientSystem.class);
 
     protected ThreadGroup clientThreadGroup;
     protected ConnectionFactory jmsConnFactory;
 
     // Properties
-    protected JmsFactoryProperties factory  = new JmsFactoryProperties();
+    protected JmsFactoryProperties factory = new JmsFactoryProperties();
     protected ThroughputSamplerTask tpSampler = new ThroughputSamplerTask();
     protected CpuSamplerTask cpuSampler = new CpuSamplerTask();
 
+    private int clientDestIndex;
+    private int clientDestCount;
+
     public void runSystemTest() throws JMSException {
         // Create connection factory
         jmsConnFactory = loadJmsFactory(getSysTest().getSpiClass(), factory.getFactorySettings());
@@ -72,7 +74,7 @@
         writer.writeProperties("cpuSamplerSettings", ReflectionUtil.retrieveObjectProperties(cpuSampler));
 
         clientThreadGroup = new ThreadGroup(getSysTest().getClientPrefix() + " Thread Group");
-        for (int i=0; i<getSysTest().getNumClients(); i++) {
+        for (int i = 0; i < getSysTest().getNumClients(); i++) {
             distributeDestinations(getSysTest().getDestDistro(), i, getSysTest().getNumClients(), getSysTest().getTotalDests());
 
             final String clientName = getSysTest().getClientPrefix() + i;
@@ -97,7 +99,7 @@
                 cpuSampler.createPlugin();
                 cpuSampler.startSampler();
             } catch (IOException e) {
-                log.warn("Unable to start CPU sampler plugin. Reason: " + e.getMessage());
+                LOG.warn("Unable to start CPU sampler plugin. Reason: " + e.getMessage());
             }
         }
 
@@ -132,7 +134,9 @@
     }
 
     public abstract JmsClientSystemProperties getSysTest();
+
     public abstract void setSysTest(JmsClientSystemProperties sysTestProps);
+
     public abstract JmsClientProperties getJmsClientProperties();
 
     protected PerformanceReportWriter createPerfWriter() {
@@ -140,10 +144,7 @@
             String reportName;
 
             if ((reportName = getSysTest().getReportName()) == null) {
-                reportName = getSysTest().getClientPrefix() + "_" +
-                             "numClients" + getSysTest().getNumClients() + "_" +
-                             "numDests" + getSysTest().getTotalDests() + "_" +
-                             getSysTest().getDestDistro();
+                reportName = getSysTest().getClientPrefix() + "_" + "numClients" + getSysTest().getNumClients() + "_" + "numDests" + getSysTest().getTotalDests() + "_" + getSysTest().getDestDistro();
             }
             return new XmlFilePerfReportWriter(getSysTest().getReportDir(), reportName);
         } else if (getSysTest().getReportType().equalsIgnoreCase(JmsClientSystemProperties.REPORT_VERBOSE)) {
@@ -159,18 +160,19 @@
             clientDestCount = numDests;
             clientDestIndex = 0;
         } else if (distroType.equalsIgnoreCase(JmsClientSystemProperties.DEST_DISTRO_EQUAL)) {
-            int destPerClient = (numDests / numClients);
+            int destPerClient = numDests / numClients;
             // There are equal or more destinations per client
             if (destPerClient > 0) {
                 clientDestCount = destPerClient;
                 clientDestIndex = destPerClient * clientIndex;
-            // If there are more clients than destinations, share destinations per client
+                // If there are more clients than destinations, share
+                // destinations per client
             } else {
                 clientDestCount = 1; // At most one destination per client
                 clientDestIndex = clientIndex % numDests;
             }
         } else if (distroType.equalsIgnoreCase(JmsClientSystemProperties.DEST_DISTRO_DIVIDE)) {
-            int destPerClient = (numDests / numClients);
+            int destPerClient = numDests / numClients;
             // There are equal or more destinations per client
             if (destPerClient > 0) {
                 int remain = numDests % numClients;
@@ -185,15 +187,16 @@
                 clientDestCount = destPerClient;
                 clientDestIndex = nextIndex;
 
-            // If there are more clients than destinations, share destinations per client
+                // If there are more clients than destinations, share
+                // destinations per client
             } else {
                 clientDestCount = 1; // At most one destination per client
                 clientDestIndex = clientIndex % numDests;
             }
 
-        // Send to all for unknown behavior
+            // Send to all for unknown behavior
         } else {
-            log.warn("Unknown destination distribution type: " + distroType);
+            LOG.warn("Unknown destination distribution type: " + distroType);
             clientDestCount = numDests;
             clientDestIndex = 0;
         }
@@ -204,7 +207,7 @@
             Class spi = Class.forName(spiClass);
             SPIConnectionFactory spiFactory = (SPIConnectionFactory)spi.newInstance();
             ConnectionFactory jmsFactory = spiFactory.createConnectionFactory(factorySettings);
-            log.info("Created: " + jmsFactory.getClass().getName() + " using SPIConnectionFactory: " + spiFactory.getClass().getName());
+            LOG.info("Created: " + jmsFactory.getClass().getName() + " using SPIConnectionFactory: " + spiFactory.getClass().getName());
             return jmsFactory;
         } catch (Exception e) {
             e.printStackTrace();
@@ -219,11 +222,11 @@
         String jmsProperties = "";
         Enumeration jmsProps = metaData.getJMSXPropertyNames();
         while (jmsProps.hasMoreElements()) {
-            jmsProperties += (jmsProps.nextElement().toString() + ",");
+            jmsProperties += jmsProps.nextElement().toString() + ",";
         }
         if (jmsProperties.length() > 0) {
             // Remove the last comma
-            jmsProperties = jmsProperties.substring(0, jmsProperties.length()-1);
+            jmsProperties = jmsProperties.substring(0, jmsProperties.length() - 1);
         }
         props.setJmsProperties(jmsProperties);
     }
@@ -238,12 +241,12 @@
             return props; // Empty properties
         }
 
-        for (int i=0; i<args.length; i++) {
+        for (int i = 0; i < args.length; i++) {
             String arg = args[i];
             if (arg.startsWith("-D") || arg.startsWith("-d")) {
                 arg = arg.substring(2);
             }
-            int index  = arg.indexOf("=");
+            int index = arg.indexOf("=");
             String key = arg.substring(0, index);
             String val = arg.substring(index + 1);
 
@@ -259,7 +262,7 @@
         Properties fileProps = new Properties();
         try {
             if (configFile != null) {
-                log.info("Loading properties file: " + configFile.getAbsolutePath());
+                LOG.info("Loading properties file: " + configFile.getAbsolutePath());
                 fileProps.load(new FileInputStream(configFile));
             }
         } catch (IOException e) {

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java Sat Aug 11 22:27:21 2007
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.tool;
 
-import org.apache.activemq.tool.sampler.MeasurableClient;
+import java.util.concurrent.atomic.AtomicLong;
 
 import javax.jms.ConnectionFactory;
 
-import java.util.concurrent.atomic.AtomicLong;
+import org.apache.activemq.tool.sampler.MeasurableClient;
 
 public abstract class AbstractJmsMeasurableClient extends AbstractJmsClient implements MeasurableClient {
     protected AtomicLong throughput = new AtomicLong(0);
 
-    public AbstractJmsMeasurableClient( ConnectionFactory factory) {
-        super( factory);
+    public AbstractJmsMeasurableClient(ConnectionFactory factory) {
+        super(factory);
     }
 
     public void reset() {

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java Sat Aug 11 22:27:21 2007
@@ -16,24 +16,23 @@
  */
 package org.apache.activemq.tool;
 
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
-import org.apache.activemq.tool.properties.JmsConsumerProperties;
-import org.apache.activemq.tool.properties.JmsClientProperties;
+import java.util.concurrent.atomic.AtomicInteger;
 
-import javax.jms.MessageConsumer;
-import javax.jms.JMSException;
 import javax.jms.ConnectionFactory;
-import javax.jms.Connection;
 import javax.jms.Destination;
+import javax.jms.JMSException;
 import javax.jms.Message;
+import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.Topic;
 
-import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.properties.JmsConsumerProperties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class JmsConsumerClient extends AbstractJmsMeasurableClient {
-    private static final Log log = LogFactory.getLog(JmsConsumerClient.class);
+    private static final Log LOG = LogFactory.getLog(JmsConsumerClient.class);
 
     protected MessageConsumer jmsConsumer;
     protected JmsConsumerProperties client;
@@ -81,7 +80,7 @@
         try {
             getConnection().start();
 
-            log.info("Starting to synchronously receive messages for " + duration + " ms...");
+            LOG.info("Starting to synchronously receive messages for " + duration + " ms...");
             long endTime = System.currentTimeMillis() + duration;
             while (System.currentTimeMillis() < endTime) {
                 getJmsConsumer().receive();
@@ -89,7 +88,7 @@
             }
         } finally {
             if (client.isDurable() && client.isUnsubscribe()) {
-                log.info("Unsubscribing durable subscriber: " + getClientName());
+                LOG.info("Unsubscribing durable subscriber: " + getClientName());
                 getJmsConsumer().close();
                 getSession().unsubscribe(getClientName());
             }
@@ -104,7 +103,7 @@
 
         try {
             getConnection().start();
-            log.info("Starting to synchronously receive " + count + " messages...");
+            LOG.info("Starting to synchronously receive " + count + " messages...");
 
             int recvCount = 0;
             while (recvCount < count) {
@@ -114,7 +113,7 @@
             }
         } finally {
             if (client.isDurable() && client.isUnsubscribe()) {
-                log.info("Unsubscribing durable subscriber: " + getClientName());
+                LOG.info("Unsubscribing durable subscriber: " + getClientName());
                 getJmsConsumer().close();
                 getSession().unsubscribe(getClientName());
             }
@@ -135,7 +134,7 @@
 
         try {
             getConnection().start();
-            log.info("Starting to asynchronously receive messages for " + duration + " ms...");
+            LOG.info("Starting to asynchronously receive messages for " + duration + " ms...");
             try {
                 Thread.sleep(duration);
             } catch (InterruptedException e) {
@@ -143,7 +142,7 @@
             }
         } finally {
             if (client.isDurable() && client.isUnsubscribe()) {
-                log.info("Unsubscribing durable subscriber: " + getClientName());
+                LOG.info("Unsubscribing durable subscriber: " + getClientName());
                 getJmsConsumer().close();
                 getSession().unsubscribe(getClientName());
             }
@@ -167,7 +166,7 @@
 
         try {
             getConnection().start();
-            log.info("Starting to asynchronously receive " + client.getRecvCount() + " messages...");
+            LOG.info("Starting to asynchronously receive " + client.getRecvCount() + " messages...");
             try {
                 while (recvCount.get() < count) {
                     recvCount.wait();
@@ -177,7 +176,7 @@
             }
         } finally {
             if (client.isDurable() && client.isUnsubscribe()) {
-                log.info("Unsubscribing durable subscriber: " + getClientName());
+                LOG.info("Unsubscribing durable subscriber: " + getClientName());
                 getJmsConsumer().close();
                 getSession().unsubscribe(getClientName());
             }
@@ -197,10 +196,10 @@
                 clientName = "JmsConsumer";
                 setClientName(clientName);
             }
-            log.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
+            LOG.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
             jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName);
         } else {
-            log.info("Creating non-durable consumer to: " + dest.toString());
+            LOG.info("Creating non-durable consumer to: " + dest.toString());
             jmsConsumer = getSession().createConsumer(dest);
         }
         return jmsConsumer;
@@ -213,10 +212,10 @@
                 clientName = "JmsConsumer";
                 setClientName(clientName);
             }
-            log.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
+            LOG.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString());
             jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName, selector, noLocal);
         } else {
-            log.info("Creating non-durable consumer to: " + dest.toString());
+            LOG.info("Creating non-durable consumer to: " + dest.toString());
             jmsConsumer = getSession().createConsumer(dest, selector, noLocal);
         }
         return jmsConsumer;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java Sat Aug 11 22:27:21 2007
@@ -16,14 +16,13 @@
  */
 package org.apache.activemq.tool;
 
+import javax.jms.JMSException;
+
+import org.apache.activemq.tool.properties.JmsClientProperties;
 import org.apache.activemq.tool.properties.JmsClientSystemProperties;
-import org.apache.activemq.tool.properties.JmsConsumerSystemProperties;
 import org.apache.activemq.tool.properties.JmsConsumerProperties;
-import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.properties.JmsConsumerSystemProperties;
 import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-
-import javax.jms.JMSException;
-import java.util.Properties;
 
 public class JmsConsumerSystem extends AbstractJmsClientSystem {
     protected JmsConsumerSystemProperties sysTest = new JmsConsumerSystemProperties();

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java Sat Aug 11 22:27:21 2007
@@ -16,21 +16,22 @@
  */
 package org.apache.activemq.tool;
 
-import org.apache.activemq.tool.properties.JmsProducerProperties;
-import org.apache.activemq.tool.properties.JmsClientProperties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.Arrays;
 
 import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
 import javax.jms.MessageProducer;
 import javax.jms.TextMessage;
-import javax.jms.JMSException;
-import javax.jms.Destination;
-import javax.jms.DeliveryMode;
-import java.util.Arrays;
+
+import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.properties.JmsProducerProperties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class JmsProducerClient extends AbstractJmsMeasurableClient {
-    private static final Log log = LogFactory.getLog(JmsProducerClient.class);
+    private static final Log LOG = LogFactory.getLog(JmsProducerClient.class);
 
     protected JmsProducerProperties client;
     protected MessageProducer jmsProducer;
@@ -81,7 +82,7 @@
         }
         try {
             getConnection().start();
-            log.info("Starting to publish " + client.getMessageSize() + " byte(s) of " + messageCount + " messages...");
+            LOG.info("Starting to publish " + client.getMessageSize() + " byte(s) of " + messageCount + " messages...");
 
             // Send one type of message only, avoiding the creation of different messages on sending
             if (!client.isCreateNewMsg()) {
@@ -148,7 +149,7 @@
 
         try {
             getConnection().start();
-            log.info("Starting to publish " + client.getMessageSize() + " byte(s) messages for " + duration + " ms");
+            LOG.info("Starting to publish " + client.getMessageSize() + " byte(s) messages for " + duration + " ms");
 
             // Send one type of message only, avoiding the creation of different messages on sending
             if (!client.isCreateNewMsg()) {
@@ -202,13 +203,13 @@
     public MessageProducer createJmsProducer() throws JMSException {
         jmsProducer = getSession().createProducer(null);
         if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_PERSISTENT)) {
-            log.info("Creating producer to possible multiple destinations with persistent delivery.");
+            LOG.info("Creating producer to possible multiple destinations with persistent delivery.");
             jmsProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
         } else if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_NON_PERSISTENT)) {
-            log.info("Creating producer to possible multiple destinations with non-persistent delivery.");
+            LOG.info("Creating producer to possible multiple destinations with non-persistent delivery.");
             jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
         } else {
-            log.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
+            LOG.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
             jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
         }
         return jmsProducer;
@@ -217,13 +218,13 @@
     public MessageProducer createJmsProducer(Destination dest) throws JMSException {
         jmsProducer = getSession().createProducer(dest);
         if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_PERSISTENT)) {
-            log.info("Creating producer to: " + dest.toString() + " with persistent delivery.");
+            LOG.info("Creating producer to: " + dest.toString() + " with persistent delivery.");
             jmsProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
         } else if (client.getDeliveryMode().equalsIgnoreCase(JmsProducerProperties.DELIVERY_MODE_NON_PERSISTENT)) {
-            log.info("Creating  producer to: " + dest.toString() + " with non-persistent delivery.");
+            LOG.info("Creating  producer to: " + dest.toString() + " with non-persistent delivery.");
             jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
         } else {
-            log.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
+            LOG.warn("Unknown deliveryMode value. Defaulting to non-persistent.");
             jmsProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
         }
         return jmsProducer;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java Sat Aug 11 22:27:21 2007
@@ -16,14 +16,13 @@
  */
 package org.apache.activemq.tool;
 
+import javax.jms.JMSException;
+
+import org.apache.activemq.tool.properties.JmsClientProperties;
 import org.apache.activemq.tool.properties.JmsClientSystemProperties;
-import org.apache.activemq.tool.properties.JmsProducerSystemProperties;
 import org.apache.activemq.tool.properties.JmsProducerProperties;
-import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.activemq.tool.properties.JmsProducerSystemProperties;
 import org.apache.activemq.tool.sampler.ThroughputSamplerTask;
-
-import javax.jms.JMSException;
-import java.util.Properties;
 
 public class JmsProducerSystem extends AbstractJmsClientSystem {
     protected JmsProducerSystemProperties sysTest = new JmsProducerSystemProperties();

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.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/JmsClientProperties.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java Sat Aug 11 22:27:21 2007
@@ -17,20 +17,20 @@
 package org.apache.activemq.tool.properties;
 
 public class JmsClientProperties extends AbstractObjectProperties {
-    public static final String SESSION_AUTO_ACKNOWLEDGE    = "autoAck";
-    public static final String SESSION_CLIENT_ACKNOWLEDGE  = "clientAck";
+    public static final String SESSION_AUTO_ACKNOWLEDGE = "autoAck";
+    public static final String SESSION_CLIENT_ACKNOWLEDGE = "clientAck";
     public static final String SESSION_DUPS_OK_ACKNOWLEDGE = "dupsAck";
-    public static final String SESSION_TRANSACTED          = "transacted";
+    public static final String SESSION_TRANSACTED = "transacted";
 
-    protected String  destName       = "TEST.FOO";
-    protected boolean destComposite  = false;
+    protected String destName = "TEST.FOO";
+    protected boolean destComposite;
 
-    protected String  sessAckMode    = SESSION_AUTO_ACKNOWLEDGE;
-    protected boolean sessTransacted = false;
+    protected String sessAckMode = SESSION_AUTO_ACKNOWLEDGE;
+    protected boolean sessTransacted;
 
-    protected String jmsProvider = null;
-    protected String jmsVersion = null;
-    protected String jmsProperties = null;
+    protected String jmsProvider;
+    protected String jmsVersion;
+    protected String jmsProperties;
 
     public String getDestName() {
         return destName;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.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/JmsClientSystemProperties.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java Sat Aug 11 22:27:21 2007
@@ -29,11 +29,11 @@
     public static final String SAMPLER_TP  = "tp";
     public static final String SAMPLER_CPU = "cpu";
 
-    protected File propsConfigFile = null;
+    protected File propsConfigFile;
 
     protected String reportType = REPORT_XML_FILE;
     protected String reportDir  = "./";
-    protected String reportName = null;
+    protected String reportName;
 
     protected String samplers = SAMPLER_TP + "," + SAMPLER_CPU; // Start both samplers
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.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/JmsConsumerProperties.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java Sat Aug 11 22:27:21 2007
@@ -20,7 +20,7 @@
     public static final String TIME_BASED_RECEIVING = "time"; // Receive messages on a time-based interval
     public static final String COUNT_BASED_RECEIVING = "count"; // Receive a specific count of messages
 
-    protected boolean durable   = false; // Consumer is a durable subscriber
+    protected boolean durable; // Consumer is a durable subscriber
     protected boolean unsubscribe = true; // If true, unsubscribe a durable subscriber after it finishes running
     protected boolean asyncRecv = true;  // If true, use onMessage() to receive messages, else use receive()
 

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.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/JmsProducerProperties.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java Sat Aug 11 22:27:21 2007
@@ -27,7 +27,8 @@
     protected long sendCount  = 1000000; // Send a million messages by default
     protected long sendDuration = 5 * 60 * 1000; // Send for 5 mins by default
     protected String sendType = TIME_BASED_SENDING;
-    protected boolean createNewMsg = false; // If true, create a different message on each send, otherwise reuse.
+    // If true, create a different message on each send, otherwise reuse.
+    protected boolean createNewMsg; 
 
     public String getDeliveryMode() {
         return deliveryMode;

Modified: activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.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/ReflectionConfigurable.java (original)
+++ activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java Sat Aug 11 22:27:21 2007
@@ -19,7 +19,7 @@
 import java.util.Properties;
 
 public interface ReflectionConfigurable {
-    public void configureProperties(Properties props);
-    public Properties retrieveProperties(Properties props);
-    public boolean acceptConfig(String key, String val);
+    void configureProperties(Properties props);
+    Properties retrieveProperties(Properties props);
+    boolean acceptConfig(String key, String val);
 }



Mime
View raw message