activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r397249 [1/2] - in /incubator/activemq/trunk/activemq-core/src: main/java/org/apache/activemq/filter/ main/java/org/apache/activemq/network/ main/java/org/apache/activemq/transport/udp/ test/java/org/apache/activemq/ test/java/org/apache/ac...
Date Wed, 26 Apr 2006 17:25:49 GMT
Author: chirino
Date: Wed Apr 26 10:25:42 2006
New Revision: 397249

URL: http://svn.apache.org/viewcvs?rev=397249&view=rev
Log:
changed a bunch of System.out.println() to log.info()

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompWireFormatTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/util/MessageIdList.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/XBeanConfigTest.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/ComparisonExpression.java Wed Apr 26 10:25:42 2006
@@ -103,7 +103,6 @@
             }
             regexp.append("\\z"); // The end of the input
 
-            System.out.println("regexp: " + like + ": " + regexp);
             likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
         }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java Wed Apr 26 10:25:42 2006
@@ -177,8 +177,8 @@
     }
     
     protected void serviceRemoteException(IOException error) {
-        System.out.println("Unexpected remote exception: "+error);
-        error.printStackTrace();
+        log.info("Unexpected remote exception: "+error);
+        log.debug("Exception trace: ", error);
     }
     
     protected void serviceRemoteCommand(Command command) {
@@ -204,8 +204,8 @@
     }
 
     protected void serviceLocalException(Throwable error) {
-        System.out.println("Unexpected local exception: "+error);
-        error.printStackTrace();
+        log.info("Unexpected local exception: "+error);
+        log.debug("Exception trace: ", error);
     }    
     protected void serviceLocalCommand(Command command) {
         try {
@@ -283,7 +283,7 @@
                     }
                 }
             } else {
-                System.out.println("Unexpected local command: "+command);
+                log.debug("Unexpected local command: "+command);
             }
         } catch (IOException e) {
             serviceLocalException(e);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java Wed Apr 26 10:25:42 2006
@@ -168,13 +168,13 @@
 
             public void start() throws Exception {
                 super.start();
-                System.out.println("Starting a new server transport: " + this + " with command: " + command);
+                log.debug("Starting a new server transport: " + this + " with command: " + command);
                 onCommand(command);
             }
 
             // lets use the specific addressing of wire format
             protected void sendWireFormat(WireFormatInfo info) throws IOException {
-                System.out.println("#### we have negotiated the wireformat; sending a wireformat to: " + address);
+                log.debug("#### we have negotiated the wireformat; sending a wireformat to: " + address);
                 transport.oneway(info, address);
             }
         };

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java Wed Apr 26 10:25:42 2006
@@ -66,7 +66,7 @@
         connection.start();
         
         String brokerName = connection.getBrokerName();
-        System.out.println("Got broker name: " + brokerName);
+        log.info("Got broker name: " + brokerName);
         
         assertNotNull("No broker name available!", brokerName);
         connection.close();
@@ -96,7 +96,7 @@
         URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(), temp.getPath(), temp.getQuery(), temp.getFragment());
         
         
-        System.out.println("connection URI is: " + connectURI);
+        log.info("connection URI is: " + connectURI);
         
         // This should create the connection.
         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(connectURI);

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java Wed Apr 26 10:25:42 2006
@@ -72,7 +72,7 @@
         connection.start();
         
         String brokerName = connection.getBrokerName();
-        System.out.println("Got broker name: " + brokerName);
+        log.info("Got broker name: " + brokerName);
         
         assertNotNull("No broker name available!", brokerName);
         connection.close();
@@ -102,7 +102,7 @@
         URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(), temp.getPath(), temp.getQuery(), temp.getFragment());
         
         
-        System.out.println("connection URI is: " + connectURI);
+        log.info("connection URI is: " + connectURI);
         
         // This should create the connection.
         ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(connectURI);

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java Wed Apr 26 10:25:42 2006
@@ -29,7 +29,7 @@
  */
 
 public class AutoFailTestSupport extends TestCase {
-     private static final Log log = LogFactory.getLog(AutoFailTestSupport.class);
+    protected static final Log log = LogFactory.getLog(AutoFailTestSupport.class);
 
     public static final int EXIT_SUCCESS = 0;
     public static final int EXIT_ERROR   = 1;
@@ -83,7 +83,7 @@
         }, "AutoFailThread");
 
         if (verbose) {
-            System.out.println("Starting auto fail thread...");
+            log.info("Starting auto fail thread...");
         }
 
         log.info("Starting auto fail thread...");
@@ -99,7 +99,7 @@
             isTestSuccess.set(true);
 
             if (verbose) {
-                System.out.println("Stopping auto fail thread...");
+                log.info("Stopping auto fail thread...");
             }
 
             log.info("Stopping auto fail thread...");

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java Wed Apr 26 10:25:42 2006
@@ -32,6 +32,9 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * Poor mans way of getting JUnit to run a test case through a few different
  * combinations of options.
@@ -64,8 +67,7 @@
  */
 public class CombinationTestSupport extends AutoFailTestSupport {
 
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(CombinationTestSupport.class);
+    protected static final Log log = LogFactory.getLog(CombinationTestSupport.class);
     
     private HashMap comboOptions = new HashMap();
     private boolean combosEvaluated;

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,19 +16,20 @@
  */
 package org.apache.activemq;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.springframework.jms.core.JmsTemplate;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
 
 import junit.framework.TestCase;
 
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.pool.PooledConnectionFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.jms.core.JmsTemplate;
+
 /**
  * A useful base class which creates and closes an embedded broker
  * 
@@ -36,6 +37,8 @@
  */
 public class EmbeddedBrokerTestSupport extends TestCase {
 
+    protected static final Log log = LogFactory.getLog(EmbeddedBrokerTestSupport.class);
+    
     protected BrokerService broker;
     //protected String bindAddress = "tcp://localhost:61616";
     protected String bindAddress = "vm://localhost";

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java Wed Apr 26 10:25:42 2006
@@ -34,7 +34,7 @@
 
     public void startBroker() {
         // Initialize the broker
-        System.out.println("Lets wait: " + delayBeforeStartingBroker + " millis  before creating the broker");
+        log.info("Lets wait: " + delayBeforeStartingBroker + " millis  before creating the broker");
         try {
             Thread.sleep(delayBeforeStartingBroker);
         }
@@ -42,7 +42,7 @@
             e.printStackTrace();
         }
         
-        System.out.println("Now starting the broker");
+        log.info("Now starting the broker");
         try {
             broker = new BrokerService();
             broker.setPersistent(false);
@@ -50,7 +50,7 @@
             broker.start();
         }
         catch (Exception e) {
-            System.out.println("Caught: " + e);
+            log.info("Caught: " + e);
             errors.add(e);
         }
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsTest.java Wed Apr 26 10:25:42 2006
@@ -17,12 +17,16 @@
 package org.apache.activemq;
 
 import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.2 $
  */
 public class JmsQueueSendReceiveTwoConnectionsTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
 
+    protected static final Log log = LogFactory.getLog(JmsQueueSendReceiveTwoConnectionsTest.class);
+    
     /**
      * Set up the test with a queue and using two connections. 
      * 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java Wed Apr 26 10:25:42 2006
@@ -45,7 +45,7 @@
         }
         catch (InvalidClientIDException e) {
             connection2.close();
-            System.out.println("Caught expected: " + e);
+            log.info("Caught expected: " + e);
         }
         }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java Wed Apr 26 10:25:42 2006
@@ -117,13 +117,13 @@
 
     protected Session createConsumer() throws JMSException {
         final String consumerText = "Consumer: " + (++consumerCounter);
-        System.out.println("Creating consumer: " + consumerText + " on destination: " + destination);
+        log.info("Creating consumer: " + consumerText + " on destination: " + destination);
         
         Session answer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageConsumer consumer = answer.createConsumer(destination);
         consumer.setMessageListener(new MessageListener() {
             public void onMessage(Message message) {
-                System.out.println("Received message by: " + consumerText + " message: " + message);
+                log.info("Received message by: " + consumerText + " message: " + message);
             }
         });
         return answer;

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java Wed Apr 26 10:25:42 2006
@@ -118,7 +118,7 @@
 
     protected Session createProducer() throws JMSException {
         final String consumerText = "Consumer: " + (++consumerCounter);
-        System.out.println("Creating consumer: " + consumerText + " on destination: " + destination);
+        log.info("Creating consumer: " + consumerText + " on destination: " + destination);
         
         Session answer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer producer = answer.createProducer(destination);

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.broker;
 
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
-
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.File;
@@ -30,8 +28,6 @@
 import javax.jms.MessageNotWriteableException;
 
 import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.RegionBroker;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQTextMessage;
@@ -55,8 +51,11 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
+
 public class BrokerTestSupport extends CombinationTestSupport {
-    private static final Log log = LogFactory.getLog(BrokerTestSupport.class);
+    
+    protected static final Log log = LogFactory.getLog(BrokerTestSupport.class);
     
     /**
      * Setting this to false makes the test run faster but they may be less accurate.
@@ -153,7 +152,7 @@
             System.out.println(prompt+"> Press enter to continue: ");
             while( System.in.read()!='\n' ) {            
             }
-            log.info(prompt+"> Done.");
+            System.out.println(prompt+"> Done.");
         }
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java Wed Apr 26 10:25:42 2006
@@ -146,7 +146,7 @@
 
         assertNotNull("Should have created an mbean name for the durable subscriber!", name1);
         
-        System.out.println("Created durable subscriber with name: "  + name1);
+        log.info("Created durable subscriber with name: "  + name1);
         
         // now lets try destroy it
         broker.destroyDurableSubscriber(clientID, "subscriber1");
@@ -211,6 +211,6 @@
     }
 
     protected void echo(String text) {
-        System.out.println(text);
+        log.info(text);
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java Wed Apr 26 10:25:42 2006
@@ -37,7 +37,7 @@
 
         ActiveMQConnection amqConnection = (ActiveMQConnection) connection;
         rollbackCount = amqConnection.getRedeliveryPolicy().getMaximumRedeliveries() + 1;
-        System.out.println("Will redeliver messages: " + rollbackCount + " times");
+        log.info("Will redeliver messages: " + rollbackCount + " times");
 
         makeConsumer();
         makeDlqConsumer();
@@ -64,7 +64,7 @@
 
             session.rollback();
         }
-        System.out.println("Rolled back: " + rollbackCount + " times");
+        log.info("Rolled back: " + rollbackCount + " times");
     }
 
     protected void setUp() throws Exception {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java Wed Apr 26 10:25:42 2006
@@ -80,7 +80,7 @@
 
     protected void makeConsumer() throws JMSException {
         Destination destination = getDestination();
-        System.out.println("Consuming from: " + destination);
+        log.info("Consuming from: " + destination);
         if (durableSubscriber) {
             consumer = session.createDurableSubscriber((Topic) destination, destination.toString());
         }
@@ -92,7 +92,7 @@
     protected void makeDlqConsumer() throws JMSException {
         dlqDestination = createDlqDestination();
 
-        System.out.println("Consuming from dead letter on: " + dlqDestination);
+        log.info("Consuming from dead letter on: " + dlqDestination);
         dlqConsumer = session.createConsumer(dlqDestination);
     }
 
@@ -102,7 +102,7 @@
         producer.setDeliveryMode(deliveryMode);
         producer.setTimeToLive(timeToLive);
 
-        System.out.println("Sending " + messageCount + " messages to: " + getDestination());
+        log.info("Sending " + messageCount + " messages to: " + getDestination());
         for (int i = 0; i < messageCount; i++) {
             Message message = createMessage(session, i);
             producer.send(message);
@@ -118,7 +118,7 @@
     }
 
     protected void assertMessage(Message message, int i) throws Exception {
-        System.out.println("Received message: " + message);
+        log.info("Received message: " + message);
         assertNotNull("No message received for index: " + i, message);
         assertTrue("Should be a TextMessage not: " + message, message instanceof TextMessage);
         TextMessage textMessage = (TextMessage) message;

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java Wed Apr 26 10:25:42 2006
@@ -39,7 +39,7 @@
 
     protected Destination createDlqDestination() {
         String queueName = "Test.DLQ." + getClass().getName() + "." + getName();
-        System.out.println("Using queue name: " + queueName);
+        log.info("Using queue name: " + queueName);
         return new ActiveMQQueue(queueName);
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/LoadTester.java Wed Apr 26 10:25:42 2006
@@ -68,7 +68,7 @@
         MessageProducer producer = session.createProducer(destination);
         producer.setDeliveryMode(DeliveryMode.PERSISTENT);
 
-        System.out.println("Sending "+ PRODUCE_COUNT+" messages that are "+(MESSAGE_SIZE/1024.0)+"k large, for a total of "+(PRODUCE_COUNT*MESSAGE_SIZE/(1024.0*1024.0))+" megs of data.");
+        log.info("Sending "+ PRODUCE_COUNT+" messages that are "+(MESSAGE_SIZE/1024.0)+"k large, for a total of "+(PRODUCE_COUNT*MESSAGE_SIZE/(1024.0*1024.0))+" megs of data.");
         // Send a message to the broker.
         long start = System.currentTimeMillis();
         for( int i=0; i < PRODUCE_COUNT; i++) {
@@ -79,7 +79,7 @@
         }
         long end1 = System.currentTimeMillis();
         
-        System.out.println("Produced messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
+        log.info("Produced messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
         
         printer = new ProgressPrinter(PRODUCE_COUNT, 10);
         start = System.currentTimeMillis();
@@ -89,7 +89,7 @@
             assertNotNull("Getting message: "+i,consumer.receive(20000));
         }
         end1 = System.currentTimeMillis();
-        System.out.println("Consumed messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
+        log.info("Consumed messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
         
         
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java Wed Apr 26 10:25:42 2006
@@ -184,7 +184,7 @@
         assertTrue(msg1.getJMSPriority() == msg2.getJMSPriority());
         assertTrue(msg1.getJMSTimestamp() == msg2.getJMSTimestamp());
         
-        System.out.println("Message is:  " + msg1);
+        log.info("Message is:  " + msg1);
     }
 
     public void testGetAndSetJMSMessageID() throws Exception {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/MessageSendTest.java Wed Apr 26 10:25:42 2006
@@ -70,6 +70,6 @@
         }
         long end = System.currentTimeMillis();
 
-        System.out.println("marshaled/unmarshaled: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec");
+        log.info("marshaled/unmarshaled: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec");
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java Wed Apr 26 10:25:42 2006
@@ -69,8 +69,8 @@
             idx += 2;
         }
         String queueName = args[idx];
-        System.out.println("Connecting to: " + uri);
-        System.out.println("Queue name is " + queueName);
+        log.info("Connecting to: " + uri);
+        log.info("Queue name is " + queueName);
 
         if (++idx < args.length) {
             text = args[idx];

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java Wed Apr 26 10:25:42 2006
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.filter;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import junit.framework.TestCase;
 
 /**
@@ -24,6 +27,7 @@
  */
 public class BadDummyPolicyConfigTest extends TestCase {
 
+    protected static final Log log = LogFactory.getLog(BadDummyPolicyConfigTest.class);
     protected DummyPolicy policy = new DummyPolicy();
     
     public void testNoDestinationSpecified() throws Exception {
@@ -53,7 +57,7 @@
             entry.afterPropertiesSet();
         }
         catch (IllegalArgumentException e) {
-            System.out.println("Worked! Caught expected exception: " + e);
+            log.info("Worked! Caught expected exception: " + e);
         }
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java Wed Apr 26 10:25:42 2006
@@ -13,22 +13,22 @@
  */
 package org.apache.activemq.kaha;
 
-import java.io.IOException;
 import java.util.Iterator;
 import java.util.Set;
-import org.apache.activemq.kaha.BytesMarshaller;
-import org.apache.activemq.kaha.MapContainer;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.activemq.kaha.Store;
-import org.apache.activemq.kaha.StringMarshaller;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
-import junit.framework.TestCase;
 /**
  * Store test
  * 
  * @version $Revision: 1.2 $
  */
 class Loader extends Thread{
+    
+    protected static final Log log = LogFactory.getLog(Loader.class);
+
     private String name;
     private Store store;
     private int count;
@@ -64,7 +64,7 @@
             }
             long finishLoad=System.currentTimeMillis();
             long totalLoadTime=finishLoad-startLoad;
-            System.out.println("name "+name+" load time = "+totalLoadTime+"(ms)");
+            log.info("name "+name+" load time = "+totalLoadTime+"(ms)");
             
             Set keys=container.keySet();
             long startExtract=System.currentTimeMillis();
@@ -74,7 +74,7 @@
             }
             long finishExtract=System.currentTimeMillis();
             long totalExtractTime=finishExtract-startExtract;
-            System.out.println("name "+name+" extract time = "+totalExtractTime+"(ms)");
+            log.info("name "+name+" extract time = "+totalExtractTime+"(ms)");
             
             long startRemove=System.currentTimeMillis();
             for(Iterator i=keys.iterator();i.hasNext();){
@@ -82,7 +82,7 @@
             }
             long finishRemove = System.currentTimeMillis();
             long totalRemoveTime = finishRemove-startRemove;
-            System.out.println("name "+name+" remove time = "+totalRemoveTime+"(ms)");
+            log.info("name "+name+" remove time = "+totalRemoveTime+"(ms)");
             //re-insert data of longer length
             startLoad=System.currentTimeMillis();
             value = getData(2048);
@@ -92,7 +92,7 @@
             }
             finishLoad=System.currentTimeMillis();
             totalLoadTime=finishLoad-startLoad;
-            System.out.println("name "+name+" 2nd load time = "+totalLoadTime+"(ms)");
+            log.info("name "+name+" 2nd load time = "+totalLoadTime+"(ms)");
             
             
         }catch(Exception e){

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,17 +16,18 @@
  */
 package org.apache.activemq.memory.buffer;
 
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.MessageQueue;
-
 import junit.framework.TestCase;
 
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  *
  * @version $Revision: 1.1 $
  */
 public abstract class MemoryBufferTestSupport extends TestCase {
+    protected static final Log log = LogFactory.getLog(MemoryBufferTestSupport.class);
 
     protected abstract MessageBuffer createMessageBuffer();
 
@@ -44,15 +45,14 @@
     }
 
     protected void dump() {
-        System.out.println("Dumping current state");
+        log.info("Dumping current state");
         dumpQueue(qA, "A");
         dumpQueue(qB, "B");
         dumpQueue(qC, "C");
-        System.out.println();
     }
 
     protected void dumpQueue(MessageQueue queue, String name) {
-        System.out.println("  " + name + " = " + queue.getList());
+        log.info("  " + name + " = " + queue.getList());
     }
 
     protected ActiveMQMessage createMessage(int size) throws Exception {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java Wed Apr 26 10:25:42 2006
@@ -14,6 +14,7 @@
 package org.apache.activemq.network;
 
 import java.net.URI;
+
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -26,15 +27,22 @@
 import javax.jms.TextMessage;
 import javax.jms.TopicRequestor;
 import javax.jms.TopicSession;
+
 import junit.framework.TestCase;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.xbean.BrokerFactoryBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 public class SimpleNetworkTest extends TestCase{
+    
+    protected static final Log log = LogFactory.getLog(SimpleNetworkTest.class);
+
     protected static final int MESSAGE_COUNT=10;
     protected AbstractApplicationContext context;
     protected Connection localConnection;
@@ -74,7 +82,7 @@
             TextMessage msg = localSession.createTextMessage("test msg: " +i);
             TextMessage result = (TextMessage) requestor.request(msg);
             assertNotNull(result);
-            System.out.println(result.getText());
+            log.info(result.getText());
         }
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java Wed Apr 26 10:25:42 2006
@@ -16,29 +16,31 @@
  */
 package org.apache.activemq.network.jms;
 
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import javax.jms.*;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueRequestor;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerRegistry;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTestSupport;
-import org.apache.activemq.broker.StubConnection;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.QueueRegion;
-import org.apache.activemq.memory.UsageManager;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class QueueBridgeTest extends TestCase implements MessageListener {
     
+    protected static final Log log = LogFactory.getLog(QueueBridgeTest.class);
+
     protected static final int MESSAGE_COUNT = 10;
     protected AbstractApplicationContext context;
     protected QueueConnection localConnection;
@@ -79,7 +81,7 @@
             TextMessage msg = requestServerSession.createTextMessage("test msg: " +i);
             TextMessage result = (TextMessage) requestor.request(msg);
             assertNotNull(result);
-            System.out.println(result.getText());
+            log.info(result.getText());
         }
     }
     

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java Wed Apr 26 10:25:42 2006
@@ -31,11 +31,15 @@
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class TopicBridgeSpringTest extends TestCase implements MessageListener {
     
+    protected static final Log log = LogFactory.getLog(TopicBridgeSpringTest.class);
+
     protected static final int MESSAGE_COUNT = 10;
     protected AbstractApplicationContext context;
     protected TopicConnection localConnection;
@@ -79,10 +83,10 @@
     public void testTopicRequestorOverBridge() throws JMSException{
         for (int i =0;i < MESSAGE_COUNT; i++){
             TextMessage msg = requestServerSession.createTextMessage("test msg: " +i);
-            System.out.println("Making request: " + msg);
+            log.info("Making request: " + msg);
             TextMessage result = (TextMessage) requestor.request(msg);
             assertNotNull(result);
-            System.out.println("Received result: " + result.getText());
+            log.info("Received result: " + result.getText());
         }
     }
     
@@ -94,7 +98,7 @@
             replyTo=msg.getJMSReplyTo();
             textMsg.clearBody();
             textMsg.setText(payload);
-            System.out.println("Sending response: " + textMsg);
+            log.info("Sending response: " + textMsg);
             requestServerProducer.send(replyTo,textMsg);
         }catch(JMSException e){
             // TODO Auto-generated catch block

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java Wed Apr 26 10:25:42 2006
@@ -23,13 +23,20 @@
 import javax.jms.Session;
 import javax.jms.TemporaryQueue;
 import javax.jms.TemporaryTopic;
+
 import junit.framework.TestCase;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 /**
  * @version $Revision: 1.3 $
  */
 public class MemoryAllocationTest extends TestCase{
+    
+    protected static final Log log = LogFactory.getLog(MemoryAllocationTest.class);
+
     protected static final int MESSAGE_COUNT=2000;
     protected BrokerService broker;
     protected String bindAddress="vm://localhost";
@@ -48,7 +55,7 @@
             mp.send(msg);
             session.close();
            releaseDestination(dest);
-            if (i%500==0)System.out.println("Iterator "+i);
+            if (i%500==0)log.info("Iterator "+i);
         }
         connection.close();
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java Wed Apr 26 10:25:42 2006
@@ -56,7 +56,7 @@
                 System.setProperty("java.security.auth.login.config", path);
             }
         }
-        System.out.println("Path to login config: " + path);
+        log.info("Path to login config: " + path);
     }
 
     public static Test suite() {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.test;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -25,19 +32,15 @@
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.2 $
  */
 public class JmsSendReceiveTestSupport extends TestSupport implements MessageListener {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(JmsSendReceiveTestSupport.class);
+    protected static final Log log = LogFactory.getLog(JmsSendReceiveTestSupport.class);
     
     protected int messageCount = 100;
     protected String[] data;

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java Wed Apr 26 10:25:42 2006
@@ -53,7 +53,7 @@
             Message message = (Message) iter.next();
             String userID = message.getStringProperty("JMSXUserID");
 
-            System.out.println("Received message with userID: " + userID);
+            log.info("Received message with userID: " + userID);
 
             assertEquals("JMSXUserID header", userName, userID);
         }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java Wed Apr 26 10:25:42 2006
@@ -21,14 +21,15 @@
 import javax.jms.Session;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTestSupport {
     
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class);
+    protected static final Log log = LogFactory.getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class);
 
     protected Connection sendConnection;
     protected Connection receiveConnection;

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,6 +16,14 @@
  */
 package org.apache.activemq.test;
 
+import java.lang.reflect.Array;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -25,15 +33,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import java.lang.reflect.Array;
-import java.util.Arrays;
-
 
 /**
  * Useful base class for unit test cases
@@ -41,7 +40,7 @@
  * @version $Revision: 1.4 $
  */
 public class TestSupport extends TestCase {
-    protected Log log = LogFactory.getLog(getClass());
+    final static protected Log log = LogFactory.getLog(TestSupport.class);
     protected ActiveMQConnectionFactory connectionFactory;
     protected boolean topic = true;
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java Wed Apr 26 10:25:42 2006
@@ -16,23 +16,27 @@
  */
 package org.apache.activemq.test.retroactive;
 
+import javax.jms.MessageListener;
+
 import org.apache.activemq.broker.region.policy.MessageQuery;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQTextMessage;
 import org.apache.activemq.command.Message;
-
-import javax.jms.MessageListener;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  *
  * @version $Revision$
  */
 public class DummyMessageQuery implements MessageQuery {
+    
+    protected static final Log log = LogFactory.getLog(DummyMessageQuery.class);
 
     public static int messageCount = 10;
     
     public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception {
-        System.out.println("Initial query is creating: " + messageCount + " messages");
+        log.info("Initial query is creating: " + messageCount + " messages");
         for (int i = 0; i < messageCount; i++) {
             ActiveMQTextMessage message = new ActiveMQTextMessage();
             message.setText("Initial message: " + i + " loaded from query");

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java Wed Apr 26 10:25:42 2006
@@ -92,7 +92,7 @@
 
     protected BrokerService createBroker() throws Exception {
         String uri = getBrokerXml();
-        System.out.println("Loading broker configuration from the classpath with URI: " + uri);
+        log.info("Loading broker configuration from the classpath with URI: " + uri);
         return BrokerFactory.createBroker(new URI("xbean:"+uri));
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java Wed Apr 26 10:25:42 2006
@@ -62,7 +62,7 @@
             producer.send(message);
         }
         producer.close();
-        System.out.println("Sent: " + updateMessageCount + " update messages");
+        log.info("Sent: " + updateMessageCount + " update messages");
 
         listener.assertMessagesReceived(messageCount);
     }
@@ -92,7 +92,7 @@
 
     protected BrokerService createBroker() throws Exception {
         String uri = getBrokerXml();
-        System.out.println("Loading broker configuration from the classpath with URI: " + uri);
+        log.info("Loading broker configuration from the classpath with URI: " + uri);
         return BrokerFactory.createBroker(new URI("xbean:"+uri));
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java Wed Apr 26 10:25:42 2006
@@ -16,22 +16,26 @@
  */
 package org.apache.activemq.transport.failover;
 
+import java.io.IOException;
+import java.net.URI;
+
+import junit.framework.TestCase;
+
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportListener;
-
-import java.io.IOException;
-import java.net.URI;
-
-import junit.framework.TestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  *
  * @version $Revision: 1.1 $
  */
 public class BadConnectionTest extends TestCase {
+    
+    protected static final Log log = LogFactory.getLog(BadConnectionTest.class);
 
     protected Transport transport;
 
@@ -41,7 +45,7 @@
             fail("This should never succeed");
         }
         catch (IOException e) {
-            System.out.println("Caught expected exception: " + e);
+            log.info("Caught expected exception: " + e);
             e.printStackTrace();
         }
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java Wed Apr 26 10:25:42 2006
@@ -159,7 +159,7 @@
         MockTransport mt = (MockTransport) connection3.getTransport().narrow(MockTransport.class);
         mt.install(new TransportFilter(mt.getNext()) {
             public void oneway(Command command) throws IOException {
-                System.out.println("Dropping: "+command);
+                log.info("Dropping: "+command);
                 // just eat it! to simulate a recent failure.
             }
         });

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java Wed Apr 26 10:25:42 2006
@@ -16,13 +16,15 @@
  */
 package org.apache.activemq.transport.multicast;
 
+import java.net.URI;
+
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.transport.CommandJoiner;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.udp.UdpTransportTest;
 import org.apache.activemq.util.IntSequenceGenerator;
-
-import java.net.URI;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  *
@@ -30,11 +32,13 @@
  */
 public class MulticastTransportTest extends UdpTransportTest {
     
+    protected static final Log log = LogFactory.getLog(MulticastTransportTest.class);
+
     private String multicastURI = "multicast://224.1.2.3:6255";
     
 
     protected Transport createProducer() throws Exception {
-        System.out.println("Producer using URI: " + multicastURI);
+        log.info("Producer using URI: " + multicastURI);
         
         // we are not using the TransportFactory as this assumes that
         // transports talk to a server using a WireFormat Negotiation step

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/peer/PeerTransportTest.java Wed Apr 26 10:25:42 2006
@@ -77,7 +77,7 @@
             consumer.setMessageListener(messageIdList[i]);
         }
         
-        System.out.println("Waiting for cluster to be fully connected");
+        log.info("Waiting for cluster to be fully connected");
         
         // Each connection should see that NUMBER_IN_CLUSTER consumers get registered on the destination.
         ActiveMQDestination advisoryDest = AdvisorySupport.getConsumerAdvisoryTopic(destination);
@@ -99,7 +99,7 @@
             session.close();
         }
         
-        System.out.println("Cluster is online.");
+        log.info("Cluster is online.");
     }
 
     protected void tearDown() throws Exception {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java Wed Apr 26 10:25:42 2006
@@ -16,16 +16,15 @@
  */
 package org.apache.activemq.transport.reliable;
 
-import edu.emory.mathcs.backport.java.util.Queue;
+import junit.framework.TestCase;
 
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.transport.StubTransport;
 import org.apache.activemq.transport.StubTransportListener;
-import org.apache.activemq.transport.reliable.ExceptionIfDroppedReplayStrategy;
-import org.apache.activemq.transport.reliable.ReliableTransport;
-import org.apache.activemq.transport.reliable.ReplayStrategy;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
-import junit.framework.TestCase;
+import edu.emory.mathcs.backport.java.util.Queue;
 
 /**
  * 
@@ -33,6 +32,8 @@
  */
 public class ReliableTransportTest extends TestCase {
 
+    protected static final Log log = LogFactory.getLog(ReliableTransportTest.class);
+
     protected ReliableTransport transport;
     protected StubTransportListener listener = new StubTransportListener();
     protected ReplayStrategy replayStrategy;
@@ -50,7 +51,7 @@
         transport.setExpectedCounter(value);
         
         for (int i = 0; i < 10; i++) {
-            System.out.println("command: " + i + " = " + value);
+            log.info("command: " + i + " = " + value);
             sequenceNumbers[i] = value++;
         }
         
@@ -119,7 +120,7 @@
         else {
             assertTrue("Should have received an exception!", exceptions.size() > 0);
             Exception e = (Exception) exceptions.remove();
-            System.out.println("Caught expected response: " + e);
+            log.info("Caught expected response: " + e);
         }
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java Wed Apr 26 10:25:42 2006
@@ -44,7 +44,7 @@
     };
 
     protected Transport createProducer() throws Exception {
-        System.out.println("Producer using URI: " + producerURI);
+        log.info("Producer using URI: " + producerURI);
 
         OpenWireFormat wireFormat = createWireFormat();
         UnreliableUdpTransport transport = new UnreliableUdpTransport(wireFormat, new URI(producerURI));
@@ -58,7 +58,7 @@
     }
 
     protected Transport createConsumer() throws Exception {
-        System.out.println("Consumer on port: " + consumerPort);
+        log.info("Consumer on port: " + consumerPort);
         OpenWireFormat wireFormat = createWireFormat();
         UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java Wed Apr 26 10:25:42 2006
@@ -462,7 +462,7 @@
 
         try {
             frame = receiveFrame(1000);
-            System.out.println("Received frame: " + frame);
+            log.info("Received frame: " + frame);
             fail("No message should have been received since subscription was removed");
         }catch (SocketTimeoutException e){
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompWireFormatTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompWireFormatTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompWireFormatTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompWireFormatTest.java Wed Apr 26 10:25:42 2006
@@ -21,6 +21,8 @@
 import org.apache.activemq.command.*;
 import org.apache.activemq.transport.stomp.Stomp;
 import org.apache.activemq.transport.stomp.StompWireFormat;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.jms.JMSException;
 
@@ -33,6 +35,9 @@
 import junit.framework.TestCase;
 
 public class StompWireFormatTest extends TestCase {
+    
+    protected static final Log log = LogFactory.getLog(StompWireFormatTest.class);
+
     private StompWireFormat wire;
 
     public void setUp() throws Exception {
@@ -51,7 +56,7 @@
         cr.setCorrelationId(ci.getCommandId());
 
         String response = writeCommand(cr);
-        System.out.println("Received: " + response);
+        log.info("Received: " + response);
 
         SessionInfo si = (SessionInfo) wire.readCommand(null);
         assertNotNull(si);
@@ -64,7 +69,7 @@
         Response sr = new Response();
         sr.setCorrelationId(pi.getCommandId());
         response = writeCommand(sr);
-        System.out.println("Received: " + response);
+        log.info("Received: " + response);
         assertTrue("Response should start with CONNECTED: " + response, response.startsWith("CONNECTED"));
 
         // now lets test subscribe
@@ -77,7 +82,7 @@
         cr = new Response();
         cr.setCorrelationId(consumerInfo.getCommandId());
         response = writeCommand(cr);
-        System.out.println("Received: " + response);
+        log.info("Received: " + response);
     }
 
     public void _testFakeServer() throws Exception {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java Wed Apr 26 10:25:42 2006
@@ -72,7 +72,7 @@
             }
             public void onException(IOException error) {
                 if( !ignoreClientError.get() ) {
-                    System.out.println("Client transport error:");
+                    log.info("Client transport error:");
                     error.printStackTrace();
                     clientErrorCount.incrementAndGet();
                 }
@@ -113,7 +113,7 @@
     
     public void onAccept(Transport transport) {
         try {
-            System.out.println("["+getName()+"] Server Accepted a Connection");
+            log.info("["+getName()+"] Server Accepted a Connection");
             serverTransport = transport;
             serverTransport.setTransportListener(new TransportListener() {
                 public void onCommand(Command command) {
@@ -124,7 +124,7 @@
                 }
                 public void onException(IOException error) {
                     if( !ignoreClientError.get() ) {
-                        System.out.println("Server transport error:");
+                        log.info("Server transport error:");
                         error.printStackTrace();
                         serverErrorCount.incrementAndGet();
                     }
@@ -158,7 +158,7 @@
             }
             public void onException(IOException error) {
                 if( !ignoreClientError.get() ) {
-                    System.out.println("Client transport error:");
+                    log.info("Client transport error:");
                     error.printStackTrace();
                     clientErrorCount.incrementAndGet();
                 }
@@ -209,7 +209,7 @@
         addCombinationValues("serverRunOnCommand", new Object[] { new Runnable() {
                 public void run() {
                     try {
-                        System.out.println("Sleeping");
+                        log.info("Sleeping");
                         Thread.sleep(4000);
                     } catch (InterruptedException e) {
                     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java Wed Apr 26 10:25:42 2006
@@ -16,12 +16,17 @@
  */
 package org.apache.activemq.transport.udp;
 
+import java.io.IOException;
+
+import javax.jms.MessageNotWriteableException;
+
+import junit.framework.TestCase;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTextMessage;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.KeepAliveInfo;
 import org.apache.activemq.command.ProducerInfo;
 import org.apache.activemq.command.Response;
 import org.apache.activemq.command.WireFormatInfo;
@@ -29,12 +34,8 @@
 import org.apache.activemq.transport.TransportAcceptListener;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.transport.TransportServer;
-
-import javax.jms.MessageNotWriteableException;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 
@@ -42,6 +43,8 @@
  */
 public abstract class UdpTestSupport extends TestCase implements TransportListener {
 
+    protected static final Log log = LogFactory.getLog(UdpTestSupport.class);
+
     protected Transport producer;
     protected Transport consumer;
 
@@ -61,7 +64,7 @@
         expected.setPrefetchSize(3456);
 
         try {
-            System.out.println("About to send: " + expected);
+            log.info("About to send: " + expected);
             producer.oneway(expected);
 
             Command received = assertCommandReceived();
@@ -72,7 +75,7 @@
             assertEquals("getPrefetchSize", expected.getPrefetchSize(), actual.getPrefetchSize());
         }
         catch (Exception e) {
-            System.out.println("Caught: " + e);
+            log.info("Caught: " + e);
             e.printStackTrace();
             fail("Failed to send to transport: " + e);
         }
@@ -100,7 +103,7 @@
         expected.setDestination(destination);
 
         try {
-            System.out.println("About to send message of type: " + expected.getClass());
+            log.info("About to send message of type: " + expected.getClass());
             producer.oneway(expected);
 
             // lets send a dummy command to ensure things don't block if we
@@ -118,10 +121,10 @@
             assertEquals("getDestination", expected.getDestination(), actual.getDestination());
             assertEquals("getText", expected.getText(), actual.getText());
 
-            System.out.println("Received text message with: " + actual.getText().length() + " character(s)");
+            log.info("Received text message with: " + actual.getText().length() + " character(s)");
         }
         catch (Exception e) {
-            System.out.println("Caught: " + e);
+            log.info("Caught: " + e);
             e.printStackTrace();
             fail("Failed to send to transport: " + e);
         }
@@ -166,11 +169,11 @@
         producer = createProducer();
         producer.setTransportListener(new TransportListener() {
             public void onCommand(Command command) {
-                System.out.println("Producer received: " + command);
+                log.info("Producer received: " + command);
             }
 
             public void onException(IOException error) {
-                System.out.println("Producer exception: " + error);
+                log.info("Producer exception: " + error);
                 error.printStackTrace();
             }
 
@@ -198,7 +201,7 @@
 
     public void onCommand(Command command) {
         if (command instanceof WireFormatInfo) {
-            System.out.println("Got WireFormatInfo: " + command);
+            log.info("Got WireFormatInfo: " + command);
         }
         else {
             if (command.isResponseRequired()) {
@@ -207,11 +210,11 @@
 
             }
             if (large) {
-                System.out.println("### Received command: " + command.getClass() + " with id: "
+                log.info("### Received command: " + command.getClass() + " with id: "
                         + command.getCommandId());
             }
             else {
-                System.out.println("### Received command: " + command);
+                log.info("### Received command: " + command);
             }
 
             synchronized (lock) {
@@ -219,7 +222,7 @@
                     receivedCommand = command;
                 }
                 else {
-                    System.out.println("Ignoring superfluous command: " + command);
+                    log.info("Ignoring superfluous command: " + command);
                 }
                 lock.notifyAll();
             }
@@ -233,23 +236,23 @@
             consumer.oneway(response);
         }
         catch (IOException e) {
-            System.out.println("Caught: " + e);
+            log.info("Caught: " + e);
             e.printStackTrace();
             throw new RuntimeException(e);
         }
     }
 
     public void onException(IOException error) {
-        System.out.println("### Received error: " + error);
+        log.info("### Received error: " + error);
         error.printStackTrace();
     }
 
     public void transportInterupted() {
-        System.out.println("### Transport interrupted");
+        log.info("### Transport interrupted");
     }
 
     public void transportResumed() {
-        System.out.println("### Transport resumed");
+        log.info("### Transport resumed");
     }
 
     protected Command assertCommandReceived() throws InterruptedException {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java Wed Apr 26 10:25:42 2006
@@ -16,12 +16,14 @@
  */
 package org.apache.activemq.transport.udp;
 
+import java.net.URI;
+
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.transport.CommandJoiner;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.util.IntSequenceGenerator;
-
-import java.net.URI;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 
@@ -29,11 +31,13 @@
  */
 public class UdpTransportTest extends UdpTestSupport {
 
+    protected static final Log log = LogFactory.getLog(UdpTransportTest.class);
+
     protected int consumerPort = 9123;
     protected String producerURI = "udp://localhost:" + consumerPort;
 
     protected Transport createProducer() throws Exception {
-        System.out.println("Producer using URI: " + producerURI);
+        log.info("Producer using URI: " + producerURI);
         
         // we are not using the TransportFactory as this assumes that
         // UDP transports talk to a server using a WireFormat Negotiation step
@@ -46,7 +50,7 @@
     }
 
     protected Transport createConsumer() throws Exception {
-        System.out.println("Consumer on port: " + consumerPort);
+        log.info("Consumer on port: " + consumerPort);
         OpenWireFormat wireFormat = createWireFormat();
         UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
         transport.setSequenceGenerator(new IntSequenceGenerator());

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java?rev=397249&r1=397248&r2=397249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java Wed Apr 26 10:25:42 2006
@@ -38,16 +38,16 @@
         ConsumerInfo expected = new ConsumerInfo();
         expected.setSelector("Edam");
         expected.setResponseRequired(true);
-        System.out.println("About to send: " + expected);
+        log.info("About to send: " + expected);
         Response response = producer.request(expected, 2000);
 
-        System.out.println("Received: " + response);
+        log.info("Received: " + response);
         assertNotNull("Received a response", response);
         assertTrue("Should not be an exception", !response.isException());
     }
 
     protected Transport createProducer() throws Exception {
-        System.out.println("Producer using URI: " + producerURI);
+        log.info("Producer using URI: " + producerURI);
         URI uri = new URI(producerURI);
         return TransportFactory.connect(uri);
     }



Mime
View raw message