activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1069405 [7/11] - in /activemq/trunk: ./ activemq-all/ activemq-camel/ activemq-camel/src/main/java/org/apache/activemq/camel/component/ activemq-camel/src/test/java/org/apache/activemq/camel/ activemq-camel/src/test/java/org/apache/activem...
Date Thu, 10 Feb 2011 14:24:21 GMT
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java Thu Feb 10 14:24:01 2011
@@ -37,8 +37,8 @@ import javax.jms.MessageProducer;
 import javax.jms.Session;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A simple queue sender which does not use JNDI
@@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFac
  */
 public final class DefaultQueueSender {
 
-    private static final Log LOG = LogFactory.getLog(DefaultQueueSender.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultQueueSender.class);
 
     private DefaultQueueSender() {    
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java Thu Feb 10 14:24:01 2011
@@ -39,8 +39,8 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A simple polymorphic JMS producer which can work with Queues or Topics which
@@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFac
  */
 public final class SimpleProducer {
 
-    private static final Log LOG = LogFactory.getLog(SimpleProducer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleProducer.class);
 
     private SimpleProducer() {
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java Thu Feb 10 14:24:01 2011
@@ -37,12 +37,12 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class SimpleQueueReceiver {
 
-    private static final Log LOG = LogFactory.getLog(SimpleQueueReceiver.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueReceiver.class);
 
     private SimpleQueueReceiver() {
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java Thu Feb 10 14:24:01 2011
@@ -40,12 +40,12 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class SimpleQueueSender {
 
-    private static final Log LOG = LogFactory.getLog(SimpleQueueSender.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleQueueSender.class);
 
     private SimpleQueueSender() {
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java Thu Feb 10 14:24:01 2011
@@ -17,15 +17,15 @@
 package org.apache.activemq.filter;
 
 import junit.framework.TestCase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.1 $
  */
 public class BadDummyPolicyConfigTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(BadDummyPolicyConfigTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BadDummyPolicyConfigTest.class);
     protected DummyPolicy policy = new DummyPolicy();
 
     public void testNoDestinationSpecified() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/jndi/InitialContextTest.java Thu Feb 10 14:24:01 2011
@@ -23,15 +23,15 @@ import javax.naming.InitialContext;
 
 import junit.framework.TestCase;
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class InitialContextTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(InitialContextTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(InitialContextTest.class);
 
     public void testInitialContext() throws Exception {
         InitialContext context = new InitialContext();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/Loader.java Thu Feb 10 14:24:01 2011
@@ -20,8 +20,8 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Store test
@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFac
  */
 class Loader extends Thread {
 
-    private static final Log LOG = LogFactory.getLog(Loader.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Loader.class);
 
     private String name;
     private Store store;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/MapContainerTest.java Thu Feb 10 14:24:01 2011
@@ -25,13 +25,13 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.apache.activemq.kaha.impl.container.BaseContainerImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import junit.framework.TestCase;
 
 public class MapContainerTest extends TestCase {
-    private static final Log LOG = LogFactory.getLog(MapContainerTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MapContainerTest.class);
     protected static final int COUNT = 10;
 
     protected String name = "test";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java Thu Feb 10 14:24:01 2011
@@ -20,13 +20,13 @@ import java.io.IOException;
 import java.util.Iterator;
 
 import junit.framework.TestCase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class VolumeTest extends TestCase {
 
     protected static final int NUMBER = 1;
-    private static final transient Log LOG = LogFactory.getLog(VolumeTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(VolumeTest.class);
 
     protected Store store;
     protected String name;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/JournalImplTest.java Thu Feb 10 14:24:01 2011
@@ -29,8 +29,8 @@ import org.apache.activeio.packet.Packet
 import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade;
 import org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager;
 import org.apache.activemq.util.ByteSequence;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Tests the AsyncDataManager based Journal
@@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFac
  */
 public class JournalImplTest extends TestCase {
 
-    Log log = LogFactory.getLog(JournalImplTest.class);
+    Logger log = LoggerFactory.getLogger(JournalImplTest.class);
 
     int size = 1024 * 10;
     int logFileCount = 2;
@@ -126,7 +126,7 @@ public class JournalImplTest extends Tes
         l = journal.getNextRecordLocation(l);
         assertNull(l);
 
-        log.info(journal);
+        log.info(journal.toString());
     }
 
     public void testReadOnlyRead() throws InvalidRecordLocationException, InterruptedException, IOException {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/impl/async/LocationTest.java Thu Feb 10 14:24:01 2011
@@ -22,8 +22,8 @@ import java.util.Collections;
 
 import junit.framework.TestCase;
 import org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Tests the Location Class
@@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFac
  * @version $Revision: 1.1 $
  */
 public class LocationTest extends TestCase {
-    private static final transient Log LOG = LogFactory.getLog(LocationTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(LocationTest.class);
 
     @SuppressWarnings("unchecked")
     public synchronized void testRecordLocationImplComparison() throws IOException {
@@ -54,7 +54,7 @@ public class LocationTest extends TestCa
         Collections.sort(l);
 
         // Did they get sorted to the correct order?
-        LOG.debug(l.get(0));
+        LOG.debug(l.get(0).toString());
         assertSame(l.get(0).getLocation(), l1);
         assertSame(l.get(1).getLocation(), l2);
         assertSame(l.get(2).getLocation(), l3);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadClient.java Thu Feb 10 14:24:01 2011
@@ -28,14 +28,14 @@ import javax.jms.TextMessage;
 
 import org.apache.activemq.ActiveMQMessageAudit;
 import org.apache.activemq.perf.PerfRate;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class LoadClient implements Runnable{
-    private static final Log LOG = LogFactory.getLog(LoadClient.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LoadClient.class);
     protected static int SLEEP_TIME = 2;
     protected String name;
     protected ConnectionFactory factory;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/load/LoadTest.java Thu Feb 10 14:24:01 2011
@@ -25,15 +25,15 @@ import javax.jms.Session;
 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class LoadTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(LoadTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(LoadTest.class);
     
     protected BrokerService broker;
     protected String bindAddress="tcp://localhost:61616";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java Thu Feb 10 14:24:01 2011
@@ -22,8 +22,8 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
@@ -31,7 +31,7 @@ import junit.framework.TestCase;
 
 public class MemoryPropertyTest extends TestCase {
 
-    private static final transient Log LOG = LogFactory.getLog(MemoryPropertyTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(MemoryPropertyTest.class);
     BrokerService broker;
 
     

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java Thu Feb 10 14:24:01 2011
@@ -21,15 +21,15 @@ import junit.framework.TestCase;
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.memory.buffer.MessageBuffer;
 import org.apache.activemq.memory.buffer.MessageQueue;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
  * @version $Revision: 1.1 $
  */
 public abstract class MemoryBufferTestSupport extends TestCase {
-    private static final Log LOG = LogFactory.getLog(MemoryBufferTestSupport.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MemoryBufferTestSupport.class);
 
     protected MessageBuffer buffer = createMessageBuffer();
     protected MessageQueue qA = buffer.createMessageQueue();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java Thu Feb 10 14:24:01 2011
@@ -61,8 +61,8 @@ import org.apache.activemq.transport.Tra
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.util.Wait;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class duplicates most of the functionality in {@link NetworkTestSupport} 
@@ -75,7 +75,7 @@ import org.apache.commons.logging.LogFac
  */
 public class BrokerNetworkWithStuckMessagesTest extends TestCase /*NetworkTestSupport*/ {
     
-    private static final Log LOG = LogFactory.getLog(BrokerNetworkWithStuckMessagesTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BrokerNetworkWithStuckMessagesTest.class);
     
     private BrokerService localBroker; 
     private BrokerService remoteBroker; 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java Thu Feb 10 14:24:01 2011
@@ -30,14 +30,14 @@ import javax.management.remote.JMXConnec
 import javax.management.remote.JMXServiceURL;
 
 import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.junit.Test;
 
 public class DuplexNetworkMBeanTest {
 
-    protected static final Log LOG = LogFactory.getLog(DuplexNetworkMBeanTest.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(DuplexNetworkMBeanTest.class);
     protected final int numRestarts = 3;
 
     protected BrokerService createBroker() throws Exception {
@@ -153,7 +153,7 @@ public class DuplexNetworkMBeanTest {
             LOG.info("Total MBean count=" + all.size());
             for (Object o : all) {
                 ObjectInstance bean = (ObjectInstance)o;
-                LOG.info(bean.getObjectName());
+                LOG.info(bean.getObjectName().toString());
             }
         } catch (Exception ignored) {
             LOG.warn("getMBeanServer ex: " + ignored);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java Thu Feb 10 14:24:01 2011
@@ -33,14 +33,14 @@ import org.apache.activemq.broker.Transp
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.transport.tcp.SslBrokerServiceTest;
 import org.apache.activemq.util.Wait;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
 public class FailoverStaticNetworkTest {
-    protected static final Log LOG = LogFactory.getLog(FailoverStaticNetworkTest.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(FailoverStaticNetworkTest.class);
 
 	private final static String DESTINATION_NAME = "testQ";
 	protected BrokerService brokerA;
@@ -196,4 +196,4 @@ public class FailoverStaticNetworkTest {
         connectionFactory.setAlwaysSyncSend(true);
         return connectionFactory;
     }
-}
\ No newline at end of file
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java Thu Feb 10 14:24:01 2011
@@ -46,8 +46,8 @@ import org.apache.activemq.command.Activ
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
 import org.apache.activemq.util.Wait;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -59,7 +59,7 @@ public class NetworkBrokerDetachTest {
 	private final static String DESTINATION_NAME = "testQ";
 	private final static int    NUM_CONSUMERS = 1;
 	
-    protected static final Log LOG = LogFactory.getLog(NetworkBrokerDetachTest.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(NetworkBrokerDetachTest.class);
     protected final int numRestarts = 3;
     protected final int networkTTL = 2;
     protected final boolean dynamicOnly = false;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkConnectionsCleanedupTest.java Thu Feb 10 14:24:01 2011
@@ -40,8 +40,8 @@ import org.apache.activemq.broker.Broker
 import org.apache.activemq.command.ActiveMQDestination;
 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
@@ -49,7 +49,7 @@ import org.springframework.core.io.Resou
 public class NetworkConnectionsCleanedupTest extends TestCase {
 
     protected static final int MESSAGE_COUNT = 10;
-    private static final Log LOG = LogFactory.getLog(NetworkConnectionsCleanedupTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkConnectionsCleanedupTest.class);
 
     protected AbstractApplicationContext context;
     protected Connection localConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java Thu Feb 10 14:24:01 2011
@@ -38,8 +38,8 @@ import org.apache.activemq.command.Activ
 import org.apache.activemq.transport.TransportFilter;
 import org.apache.activemq.transport.failover.FailoverTransport;
 import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
@@ -47,7 +47,7 @@ import org.springframework.core.io.Resou
 public class NetworkFailoverTest extends TestCase {
 
     protected static final int MESSAGE_COUNT = 10;
-    private static final Log LOG = LogFactory.getLog(NetworkFailoverTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkFailoverTest.class);
 
     protected AbstractApplicationContext context;
     protected Connection localConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java Thu Feb 10 14:24:01 2011
@@ -1,336 +1,336 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.network;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import junit.framework.TestCase;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQPrefetchPolicy;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
-import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.usage.SystemUsage;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * This test case is used to load test store and forwarding between brokers.  It sets up
- * n brokers to which have a chain of queues which this test consumes and produces to. 
- * 
- * If the network bridges gets stuck at any point subsequent queues will not get messages.  This test 
- * samples the production and consumption stats every second and if the flow of messages
- * get stuck then this tast fails.  The test monitors the flow of messages for 1 min.
- *  
- * @author chirino
- */
-public class NetworkLoadTest extends TestCase {
-
-	private static final transient Log LOG = LogFactory.getLog(NetworkLoadTest.class);
-
-	// How many times do we sample?
-    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", ""+60*1/5)); 
-    // Slower machines might need to make this bigger.
-    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
-	protected static final int BROKER_COUNT = 4;
-	protected static final int MESSAGE_SIZE = 2000;
-        String groupId;
-        
-	class ForwardingClient {
-
-		private final AtomicLong forwardCounter = new AtomicLong();
-		private final Connection toConnection;
-		private final Connection fromConnection;
-
-		public ForwardingClient(int from, int to) throws JMSException {
-			toConnection = createConnection(from);
-			Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
-			producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-			producer.setDisableMessageID(true);
-
-			fromConnection = createConnection(from);
-			Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-			MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
-			
-			consumer.setMessageListener(new MessageListener() {
-					public void onMessage(Message msg) {
-						try {
-							producer.send(msg);
-							forwardCounter.incrementAndGet();
-						} catch (JMSException e) {
-							// this is caused by the connection getting closed. 
-						}
-					}
-			});
-		}
-
-		public void start() throws JMSException {
-			toConnection.start();
-			fromConnection.start();
-		}
-		
-		public void stop() throws JMSException {
-		        toConnection.stop();
-			fromConnection.stop();
-		}
-		
-		public void close() throws JMSException {
-			toConnection.close();
-			fromConnection.close();
-		}
-	}
-
-	private BrokerService[] brokers;
-	private ForwardingClient[] forwardingClients;
-
-	
-	protected void setUp() throws Exception {
-	        groupId = "network-load-test-"+System.currentTimeMillis();
-		brokers = new BrokerService[BROKER_COUNT];
-		for (int i = 0; i < brokers.length; i++) {
-		    LOG.info("Starting broker: "+i);
-			brokers[i] = createBroker(i);
-			brokers[i].start();
-		}
-		
-		// Wait for the network connection to get setup.
-		// The wait is exponential since every broker has to connect to every other broker.
-		Thread.sleep(BROKER_COUNT*BROKER_COUNT*50);
-		
-		forwardingClients = new ForwardingClient[BROKER_COUNT-1];		
-		for (int i = 0; i < forwardingClients.length; i++) {
-		    LOG.info("Starting fowarding client "+i);
-			forwardingClients[i] = new ForwardingClient(i, i+1);
-			forwardingClients[i].start();
-		}
-	}
-
-	protected void tearDown() throws Exception {
-		for (int i = 0; i < forwardingClients.length; i++) {
-		    LOG.info("Stoping fowarding client "+i);
-			forwardingClients[i].close();
-		}
-		for (int i = 0; i < brokers.length; i++) {
-		    LOG.info("Stoping broker "+i);
-			brokers[i].stop();
-		}
-	}
-
-	protected Connection createConnection(int brokerId) throws JMSException {
-		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:"+(60000+brokerId));
-        connectionFactory.setOptimizedMessageDispatch(true);
-        connectionFactory.setCopyMessageOnSend(false);
-        connectionFactory.setUseCompression(false);
-        connectionFactory.setDispatchAsync(true);
-        connectionFactory.setUseAsyncSend(false);
-        connectionFactory.setOptimizeAcknowledge(false);
-        connectionFactory.setWatchTopicAdvisories(false);
-        ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy();
-        qPrefetchPolicy.setQueuePrefetch(100);
-        qPrefetchPolicy.setTopicPrefetch(1000);
-        connectionFactory.setPrefetchPolicy(qPrefetchPolicy);
-        connectionFactory.setAlwaysSyncSend(true);
-		return connectionFactory.createConnection();
-	}
-
-	protected BrokerService createBroker(int brokerId) throws Exception {
-		BrokerService broker = new BrokerService();
-		broker.setBrokerName("broker-" + brokerId);
-		broker.setPersistent(false);
-		broker.setUseJmx(true);
-		broker.getManagementContext().setCreateConnector(false);
-
-		final SystemUsage memoryManager = new SystemUsage();
-		memoryManager.getMemoryUsage().setLimit(1024 * 1024 * 50); // 50 MB
-		broker.setSystemUsage(memoryManager);
-
-		final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
-		final PolicyEntry entry = new PolicyEntry();
-		entry.setQueue(">");
-		entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB
-		entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
-		entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
-		policyEntries.add(entry);
-
-		// This is to turn of the default behavior of storing topic messages for retroactive consumption
-		final PolicyEntry topicPolicyEntry = new PolicyEntry();
-		topicPolicyEntry.setTopic(">");
-		final NoSubscriptionRecoveryPolicy noSubscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy();
-		topicPolicyEntry.setSubscriptionRecoveryPolicy(noSubscriptionRecoveryPolicy);
-
-		final PolicyMap policyMap = new PolicyMap();
-		policyMap.setPolicyEntries(policyEntries);
-		broker.setDestinationPolicy(policyMap);
-		
-        TransportConnector transportConnector = new TransportConnector();
-        transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
-        
-        transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId));        
-        broker.addConnector(transportConnector);
-                        
-        DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector();
-        networkConnector.setUri(new URI("multicast://default?group="+groupId));
-	    networkConnector.setBridgeTempDestinations(true);
-	    networkConnector.setPrefetchSize(1);
-	    broker.addNetworkConnector(networkConnector);
-        
-		return broker;
-	}
-	
-	public void testRequestReply() throws Exception {
-
-		final int to = 0; // Send to the first broker
-		int from = brokers.length-1; // consume from the last broker..
-				
-	    LOG.info("Staring Final Consumer");
-
-	    Connection fromConnection = createConnection(from);
-		fromConnection.start();
-		Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
-		
-		final AtomicReference<ActiveMQTextMessage> lastMessageReceived = new AtomicReference<ActiveMQTextMessage>();
-		final AtomicLong producedMessages = new AtomicLong();
-		final AtomicLong receivedMessages = new AtomicLong();
-		final AtomicBoolean done = new AtomicBoolean();
-
-		// Setup the consumer..
-		consumer.setMessageListener(new MessageListener() {
-			public void onMessage(Message msg) {
-				ActiveMQTextMessage m = (ActiveMQTextMessage) msg;
-				ActiveMQTextMessage last = lastMessageReceived.get();
-				if( last!=null ) {
-					// Some order checking...
-					if( last.getMessageId().getProducerSequenceId() > m.getMessageId().getProducerSequenceId() ) {
-						System.out.println("Received an out of order message. Got "+m.getMessageId()+", expected something after "+last.getMessageId());
-					}
-				}
-				lastMessageReceived.set(m);
-				receivedMessages.incrementAndGet();
-			}
-		});
-
-	    LOG.info("Staring Initial Producer");
-		final Connection toConnection = createConnection(to);
-		Thread producer = new Thread("Producer") {
-			@Override
-			public void run() {
-				try {
-					toConnection.start();
-					Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-					final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
-					producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-					producer.setDisableMessageID(true);
-
-					for (int i = 0; !done.get(); i++) {
-						TextMessage msg = toSession.createTextMessage(createMessageText(i));
-						producer.send(msg);
-						producedMessages.incrementAndGet();
-					}
-				} catch (JMSException e) {
-					e.printStackTrace();
-				}
-			}
-			
-		    private String createMessageText(int index) {
-				StringBuffer buffer = new StringBuffer(MESSAGE_SIZE);
-				buffer.append(index + " on " + new Date() + " ...");
-				if (buffer.length() > MESSAGE_SIZE) {
-					return buffer.substring(0, MESSAGE_SIZE);
-				}
-				for (int i = buffer.length(); i < MESSAGE_SIZE; i++) {
-					buffer.append(' ');
-				}
-
-				return buffer.toString();
-			}
-		};
-		producer.start();
-	
-		
-		// Give the forwarding clients a chance to get going and fill the down
-		// stream broker queues..
-		Thread.sleep(BROKER_COUNT*200);
-		
-        for (int i = 0; i < SAMPLES; i++) {
-
-            long start = System.currentTimeMillis();
-            producedMessages.set(0);
-            receivedMessages.set(0);
-            for (int j = 0; j < forwardingClients.length; j++) {
-    			forwardingClients[j].forwardCounter.set(0);
-    		}
-
-            Thread.sleep(SAMPLE_DURATION);
-
-            long end = System.currentTimeMillis();
-            long r = receivedMessages.get();
-            long p = producedMessages.get();
-
-            LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec");
-            
-            StringBuffer fwdingmsg = new StringBuffer(500);
-            fwdingmsg.append("  forwarding counters: ");
-            for (int j = 0; j < forwardingClients.length; j++) {
-            	if( j!= 0 ) {
-            		fwdingmsg.append(", ");
-            	}
-                fwdingmsg.append(forwardingClients[j].forwardCounter.get());
-    		}
-            LOG.info(fwdingmsg);
-
-            // The test is just checking to make sure thaat the producer and consumer does not hang
-            // due to the network hops take to route the message form the producer to the consumer.
-            assertTrue("Recieved some messages since last sample", r>0);
-            assertTrue("Produced some messages since last sample", p>0);
-            
-        }
-        LOG.info("Sample done.");
-        done.set(true);
-        // Wait for the producer to finish.
-        producer.join(1000*5);
-        toConnection.close();
-        fromConnection.close();
-        
-	}
-
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.network;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import junit.framework.TestCase;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.ActiveMQPrefetchPolicy;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.TransportConnector;
+import org.apache.activemq.broker.region.policy.NoSubscriptionRecoveryPolicy;
+import org.apache.activemq.broker.region.policy.PolicyEntry;
+import org.apache.activemq.broker.region.policy.PolicyMap;
+import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;
+import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTextMessage;
+import org.apache.activemq.usage.SystemUsage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This test case is used to load test store and forwarding between brokers.  It sets up
+ * n brokers to which have a chain of queues which this test consumes and produces to. 
+ * 
+ * If the network bridges gets stuck at any point subsequent queues will not get messages.  This test 
+ * samples the production and consumption stats every second and if the flow of messages
+ * get stuck then this tast fails.  The test monitors the flow of messages for 1 min.
+ *  
+ * @author chirino
+ */
+public class NetworkLoadTest extends TestCase {
+
+	private static final transient Logger LOG = LoggerFactory.getLogger(NetworkLoadTest.class);
+
+	// How many times do we sample?
+    private static final long SAMPLES = Integer.parseInt(System.getProperty("SAMPLES", ""+60*1/5)); 
+    // Slower machines might need to make this bigger.
+    private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
+	protected static final int BROKER_COUNT = 4;
+	protected static final int MESSAGE_SIZE = 2000;
+        String groupId;
+        
+	class ForwardingClient {
+
+		private final AtomicLong forwardCounter = new AtomicLong();
+		private final Connection toConnection;
+		private final Connection fromConnection;
+
+		public ForwardingClient(int from, int to) throws JMSException {
+			toConnection = createConnection(from);
+			Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+			final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
+			producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+			producer.setDisableMessageID(true);
+
+			fromConnection = createConnection(from);
+			Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+			MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
+			
+			consumer.setMessageListener(new MessageListener() {
+					public void onMessage(Message msg) {
+						try {
+							producer.send(msg);
+							forwardCounter.incrementAndGet();
+						} catch (JMSException e) {
+							// this is caused by the connection getting closed. 
+						}
+					}
+			});
+		}
+
+		public void start() throws JMSException {
+			toConnection.start();
+			fromConnection.start();
+		}
+		
+		public void stop() throws JMSException {
+		        toConnection.stop();
+			fromConnection.stop();
+		}
+		
+		public void close() throws JMSException {
+			toConnection.close();
+			fromConnection.close();
+		}
+	}
+
+	private BrokerService[] brokers;
+	private ForwardingClient[] forwardingClients;
+
+	
+	protected void setUp() throws Exception {
+	        groupId = "network-load-test-"+System.currentTimeMillis();
+		brokers = new BrokerService[BROKER_COUNT];
+		for (int i = 0; i < brokers.length; i++) {
+		    LOG.info("Starting broker: "+i);
+			brokers[i] = createBroker(i);
+			brokers[i].start();
+		}
+		
+		// Wait for the network connection to get setup.
+		// The wait is exponential since every broker has to connect to every other broker.
+		Thread.sleep(BROKER_COUNT*BROKER_COUNT*50);
+		
+		forwardingClients = new ForwardingClient[BROKER_COUNT-1];		
+		for (int i = 0; i < forwardingClients.length; i++) {
+		    LOG.info("Starting fowarding client "+i);
+			forwardingClients[i] = new ForwardingClient(i, i+1);
+			forwardingClients[i].start();
+		}
+	}
+
+	protected void tearDown() throws Exception {
+		for (int i = 0; i < forwardingClients.length; i++) {
+		    LOG.info("Stoping fowarding client "+i);
+			forwardingClients[i].close();
+		}
+		for (int i = 0; i < brokers.length; i++) {
+		    LOG.info("Stoping broker "+i);
+			brokers[i].stop();
+		}
+	}
+
+	protected Connection createConnection(int brokerId) throws JMSException {
+		ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:"+(60000+brokerId));
+        connectionFactory.setOptimizedMessageDispatch(true);
+        connectionFactory.setCopyMessageOnSend(false);
+        connectionFactory.setUseCompression(false);
+        connectionFactory.setDispatchAsync(true);
+        connectionFactory.setUseAsyncSend(false);
+        connectionFactory.setOptimizeAcknowledge(false);
+        connectionFactory.setWatchTopicAdvisories(false);
+        ActiveMQPrefetchPolicy qPrefetchPolicy= new ActiveMQPrefetchPolicy();
+        qPrefetchPolicy.setQueuePrefetch(100);
+        qPrefetchPolicy.setTopicPrefetch(1000);
+        connectionFactory.setPrefetchPolicy(qPrefetchPolicy);
+        connectionFactory.setAlwaysSyncSend(true);
+		return connectionFactory.createConnection();
+	}
+
+	protected BrokerService createBroker(int brokerId) throws Exception {
+		BrokerService broker = new BrokerService();
+		broker.setBrokerName("broker-" + brokerId);
+		broker.setPersistent(false);
+		broker.setUseJmx(true);
+		broker.getManagementContext().setCreateConnector(false);
+
+		final SystemUsage memoryManager = new SystemUsage();
+		memoryManager.getMemoryUsage().setLimit(1024 * 1024 * 50); // 50 MB
+		broker.setSystemUsage(memoryManager);
+
+		final List<PolicyEntry> policyEntries = new ArrayList<PolicyEntry>();
+		final PolicyEntry entry = new PolicyEntry();
+		entry.setQueue(">");
+		entry.setMemoryLimit(1024 * 1024 * 1); // Set to 1 MB
+		entry.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
+		entry.setPendingQueuePolicy(new VMPendingQueueMessageStoragePolicy());
+		policyEntries.add(entry);
+
+		// This is to turn of the default behavior of storing topic messages for retroactive consumption
+		final PolicyEntry topicPolicyEntry = new PolicyEntry();
+		topicPolicyEntry.setTopic(">");
+		final NoSubscriptionRecoveryPolicy noSubscriptionRecoveryPolicy = new NoSubscriptionRecoveryPolicy();
+		topicPolicyEntry.setSubscriptionRecoveryPolicy(noSubscriptionRecoveryPolicy);
+
+		final PolicyMap policyMap = new PolicyMap();
+		policyMap.setPolicyEntries(policyEntries);
+		broker.setDestinationPolicy(policyMap);
+		
+        TransportConnector transportConnector = new TransportConnector();
+        transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
+        
+        transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId));        
+        broker.addConnector(transportConnector);
+                        
+        DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector();
+        networkConnector.setUri(new URI("multicast://default?group="+groupId));
+	    networkConnector.setBridgeTempDestinations(true);
+	    networkConnector.setPrefetchSize(1);
+	    broker.addNetworkConnector(networkConnector);
+        
+		return broker;
+	}
+	
+	public void testRequestReply() throws Exception {
+
+		final int to = 0; // Send to the first broker
+		int from = brokers.length-1; // consume from the last broker..
+				
+	    LOG.info("Staring Final Consumer");
+
+	    Connection fromConnection = createConnection(from);
+		fromConnection.start();
+		Session fromSession = fromConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+		MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q"+from));
+		
+		final AtomicReference<ActiveMQTextMessage> lastMessageReceived = new AtomicReference<ActiveMQTextMessage>();
+		final AtomicLong producedMessages = new AtomicLong();
+		final AtomicLong receivedMessages = new AtomicLong();
+		final AtomicBoolean done = new AtomicBoolean();
+
+		// Setup the consumer..
+		consumer.setMessageListener(new MessageListener() {
+			public void onMessage(Message msg) {
+				ActiveMQTextMessage m = (ActiveMQTextMessage) msg;
+				ActiveMQTextMessage last = lastMessageReceived.get();
+				if( last!=null ) {
+					// Some order checking...
+					if( last.getMessageId().getProducerSequenceId() > m.getMessageId().getProducerSequenceId() ) {
+						System.out.println("Received an out of order message. Got "+m.getMessageId()+", expected something after "+last.getMessageId());
+					}
+				}
+				lastMessageReceived.set(m);
+				receivedMessages.incrementAndGet();
+			}
+		});
+
+	    LOG.info("Staring Initial Producer");
+		final Connection toConnection = createConnection(to);
+		Thread producer = new Thread("Producer") {
+			@Override
+			public void run() {
+				try {
+					toConnection.start();
+					Session toSession = toConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+					final MessageProducer producer = toSession.createProducer(new ActiveMQQueue("Q"+to));
+					producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+					producer.setDisableMessageID(true);
+
+					for (int i = 0; !done.get(); i++) {
+						TextMessage msg = toSession.createTextMessage(createMessageText(i));
+						producer.send(msg);
+						producedMessages.incrementAndGet();
+					}
+				} catch (JMSException e) {
+					e.printStackTrace();
+				}
+			}
+			
+		    private String createMessageText(int index) {
+				StringBuffer buffer = new StringBuffer(MESSAGE_SIZE);
+				buffer.append(index + " on " + new Date() + " ...");
+				if (buffer.length() > MESSAGE_SIZE) {
+					return buffer.substring(0, MESSAGE_SIZE);
+				}
+				for (int i = buffer.length(); i < MESSAGE_SIZE; i++) {
+					buffer.append(' ');
+				}
+
+				return buffer.toString();
+			}
+		};
+		producer.start();
+	
+		
+		// Give the forwarding clients a chance to get going and fill the down
+		// stream broker queues..
+		Thread.sleep(BROKER_COUNT*200);
+		
+        for (int i = 0; i < SAMPLES; i++) {
+
+            long start = System.currentTimeMillis();
+            producedMessages.set(0);
+            receivedMessages.set(0);
+            for (int j = 0; j < forwardingClients.length; j++) {
+    			forwardingClients[j].forwardCounter.set(0);
+    		}
+
+            Thread.sleep(SAMPLE_DURATION);
+
+            long end = System.currentTimeMillis();
+            long r = receivedMessages.get();
+            long p = producedMessages.get();
+
+            LOG.info("published: " + p + " msgs at " + (p * 1000f / (end - start)) + " msgs/sec, " + "consumed: " + r + " msgs at " + (r * 1000f / (end - start)) + " msgs/sec");
+            
+            StringBuffer fwdingmsg = new StringBuffer(500);
+            fwdingmsg.append("  forwarding counters: ");
+            for (int j = 0; j < forwardingClients.length; j++) {
+            	if( j!= 0 ) {
+            		fwdingmsg.append(", ");
+            	}
+                fwdingmsg.append(forwardingClients[j].forwardCounter.get());
+    		}
+            LOG.info(fwdingmsg.toString());
+
+            // The test is just checking to make sure thaat the producer and consumer does not hang
+            // due to the network hops take to route the message form the producer to the consumer.
+            assertTrue("Recieved some messages since last sample", r>0);
+            assertTrue("Produced some messages since last sample", p>0);
+            
+        }
+        LOG.info("Sample done.");
+        done.set(true);
+        // Wait for the producer to finish.
+        producer.join(1000*5);
+        toConnection.close();
+        fromConnection.close();
+        
+	}
+
+
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java Thu Feb 10 14:24:01 2011
@@ -37,8 +37,8 @@ import org.apache.activemq.advisory.Cons
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * These test cases are used to verifiy that network connections get re
@@ -48,7 +48,7 @@ import org.apache.commons.logging.LogFac
  */
 public class NetworkReconnectTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(NetworkReconnectTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkReconnectTest.class);
 
     private BrokerService producerBroker;
     private BrokerService consumerBroker;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SSHTunnelNetworkReconnectTest.java Thu Feb 10 14:24:01 2011
@@ -24,8 +24,8 @@ import java.util.Iterator;
 
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Test network reconnects over SSH tunnels. This case can be especially tricky
@@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFac
  * @author chirino
  */
 public class SSHTunnelNetworkReconnectTest extends NetworkReconnectTest {
-    private static final transient Log LOG = LogFactory.getLog(SSHTunnelNetworkReconnectTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(SSHTunnelNetworkReconnectTest.class);
 
     ArrayList processes = new ArrayList();
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java Thu Feb 10 14:24:01 2011
@@ -34,8 +34,8 @@ import org.apache.activemq.ActiveMQConne
 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
@@ -43,7 +43,7 @@ import org.springframework.core.io.Resou
 public class SimpleNetworkTest extends TestCase {
 
     protected static final int MESSAGE_COUNT = 10;
-    private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class);
 
     protected AbstractApplicationContext context;
     protected Connection localConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java Thu Feb 10 14:24:01 2011
@@ -32,15 +32,15 @@ import javax.jms.TextMessage;
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class QueueBridgeTest extends TestCase implements MessageListener {
 
     protected static final int MESSAGE_COUNT = 10;
-    private static final Log LOG = LogFactory.getLog(QueueBridgeTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(QueueBridgeTest.class);
 
     protected AbstractApplicationContext context;
     protected QueueConnection localConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java Thu Feb 10 14:24:01 2011
@@ -31,15 +31,15 @@ import javax.jms.TopicSession;
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class TopicBridgeSpringTest extends TestCase implements MessageListener {
 
     protected static final int MESSAGE_COUNT = 10;
-    private static final Log LOG = LogFactory.getLog(TopicBridgeSpringTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TopicBridgeSpringTest.class);
 
     protected AbstractApplicationContext context;
     protected TopicConnection localConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java Thu Feb 10 14:24:01 2011
@@ -58,13 +58,13 @@ import org.apache.activemq.openwire.v1.B
 import org.apache.activemq.openwire.v1.MessageAckTest;
 import org.apache.activemq.test.TestSupport;
 import org.apache.activemq.util.ByteSequence;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class DataFileGeneratorTestSupport extends TestSupport {
 
     protected static final Object[] EMPTY_ARGUMENTS = {};
-    private static final Log LOG = LogFactory.getLog(DataFileGeneratorTestSupport.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DataFileGeneratorTestSupport.class);
 
     private static final Throwable SINGLETON_EXCEPTION = new Exception("shared exception");
     private static final File MODULE_BASE_DIR;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java Thu Feb 10 14:24:01 2011
@@ -24,15 +24,15 @@ import java.io.IOException;
 
 import junit.framework.TestCase;
 import org.apache.activemq.command.SessionId;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision$
  */
 public class NumberRangesWhileMarshallingTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(NumberRangesWhileMarshallingTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NumberRangesWhileMarshallingTest.class);
 
     protected String connectionId = "Cheese";
     protected ByteArrayOutputStream buffer = new ByteArrayOutputStream();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ConnectionChurnTest.java Thu Feb 10 14:24:01 2011
@@ -26,15 +26,15 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class ConnectionChurnTest extends TestCase {
     protected static final int CONNECTION_COUNT = 200;
-    private static final Log LOG = LogFactory.getLog(ConnectionChurnTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ConnectionChurnTest.class);
     protected BrokerService broker;
     protected String bindAddress = ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL+"?transport.closeAsync=false";
     protected int topicCount;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveDurableTopicTest.java Thu Feb 10 14:24:01 2011
@@ -29,14 +29,14 @@ import junit.framework.AssertionFailedEr
 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision$
  */
 public class InactiveDurableTopicTest extends TestCase {
-    private static final transient Log LOG = LogFactory.getLog(InactiveDurableTopicTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(InactiveDurableTopicTest.class);
 
     private static final int MESSAGE_COUNT = 2000;
     private static final String DEFAULT_PASSWORD = "";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/InactiveQueueTest.java Thu Feb 10 14:24:01 2011
@@ -27,14 +27,14 @@ import javax.jms.TopicSubscriber;
 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 454471 $
  */
 public class InactiveQueueTest extends TestCase {
-    private static final transient Log LOG = LogFactory.getLog(InactiveQueueTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(InactiveQueueTest.class);
 
     private static final int MESSAGE_COUNT = 0;
     private static final String DEFAULT_PASSWORD = "";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/MemoryAllocationTest.java Thu Feb 10 14:24:01 2011
@@ -31,8 +31,8 @@ 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
@@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFac
 public class MemoryAllocationTest extends TestCase {
 
     protected static final int MESSAGE_COUNT = 2000;
-    private static final Log LOG = LogFactory.getLog(MemoryAllocationTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MemoryAllocationTest.class);
 
     protected BrokerService broker;
     protected String bindAddress = "vm://localhost";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NetworkedSyncTest.java Thu Feb 10 14:24:01 2011
@@ -33,8 +33,8 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.network.NetworkConnector;
 import org.apache.activemq.xbean.BrokerFactoryBean;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 
@@ -47,7 +47,7 @@ public class NetworkedSyncTest extends T
     public final static String broker1URL = "tcp://localhost:61616";
     public final static String broker2URL = "tcp://localhost:62616";
     private final String networkConnectorURL = "static://(" + broker2URL + ")";
-    private static final Log LOG = LogFactory.getLog(NetworkedSyncTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetworkedSyncTest.class);
     BrokerService broker1 = null;
     BrokerService broker2 = null;
     NetworkConnector connector = null;
@@ -89,7 +89,7 @@ public class NetworkedSyncTest extends T
                 broker1.waitUntilStopped();
             }
         } catch (Exception e) {
-            LOG.fatal("Error: " + e.getMessage());
+            LOG.error("Error: " + e.getMessage());
             throw e;
             // brokerService.stop();
         }
@@ -110,7 +110,7 @@ public class NetworkedSyncTest extends T
                 broker2.waitUntilStopped();
             }
         } catch (Exception e) {
-            LOG.fatal("Error: " + e.getMessage());
+            LOG.error("Error: " + e.getMessage());
             throw e;
         }
 
@@ -175,7 +175,7 @@ public class NetworkedSyncTest extends T
  */
 class Producer implements Runnable {
 
-    private static final Log LOG = LogFactory.getLog(Producer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Producer.class);
 
     /**
      * connect to broker and constantly send messages
@@ -221,7 +221,7 @@ class Producer implements Runnable {
 
             }
         } catch (Exception ex) {
-            LOG.error(ex);
+            LOG.error(ex.toString());
             return;
         } finally {
             try {
@@ -245,7 +245,7 @@ class Producer implements Runnable {
  */
 class Consumer implements Runnable {
 
-    private static final Log LOG = LogFactory.getLog(Consumer.class);;
+    private static final Logger LOG = LoggerFactory.getLogger(Consumer.class);;
 
     
     /**

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/NumberOfDestinationsTest.java Thu Feb 10 14:24:01 2011
@@ -32,15 +32,15 @@ import junit.framework.TestCase;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 /**
  * @version $Revision: 1.3 $
  */
 public class NumberOfDestinationsTest extends TestCase {
     protected static final int MESSAGE_COUNT = 1;
     protected static final int NUMBER_OF_DESTINATIONS = 100000;
-    private static final Log LOG = LogFactory.getLog(NumberOfDestinationsTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NumberOfDestinationsTest.class);
     protected BrokerService broker;
     protected String bindAddress = "vm://localhost";
     protected int destinationCount;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfConsumer.java Thu Feb 10 14:24:01 2011
@@ -26,14 +26,14 @@ import javax.jms.MessageListener;
 import javax.jms.Session;
 import javax.jms.Topic;
 import org.apache.activemq.ActiveMQMessageAudit;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class PerfConsumer implements MessageListener {
-    private static final Log LOG = LogFactory.getLog(PerfConsumer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(PerfConsumer.class);
     protected Connection connection;
     protected MessageConsumer consumer;
     protected long sleepDuration;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QueueConnectionMemoryTest.java Thu Feb 10 14:24:01 2011
@@ -23,14 +23,14 @@ import javax.jms.MessageConsumer;
 import javax.jms.Session;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class QueueConnectionMemoryTest extends SimpleQueueTest {
-    private static final transient Log LOG = LogFactory.getLog(QueueConnectionMemoryTest.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(QueueConnectionMemoryTest.class);
 
     protected void setUp() throws Exception {
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java Thu Feb 10 14:24:01 2011
@@ -24,13 +24,13 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.ActiveMQPrefetchPolicy;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.network.NetworkConnector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class SimpleNetworkTest extends SimpleTopicTest {
 
-    private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleNetworkTest.class);
     protected String consumerBindAddress = "tcp://localhost:61616";
     protected String producerBindAddress = "tcp://localhost:61617";
     protected static final String CONSUMER_BROKER_NAME = "Consumer";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java Thu Feb 10 14:24:01 2011
@@ -24,15 +24,15 @@ import javax.jms.Session;
 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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class SimpleTopicTest extends TestCase {
 
-    private static final Log LOG = LogFactory.getLog(SimpleTopicTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleTopicTest.class);
     
     protected BrokerService broker;
     protected String clientURI="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=false&wireFormat.maxInactivityDuration=0";

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java Thu Feb 10 14:24:01 2011
@@ -21,14 +21,14 @@ import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 1.3 $
  */
 public class SlowConsumer extends PerfConsumer {
-    private static final transient Log LOG = LogFactory.getLog(SlowConsumer.class);
+    private static final transient Logger LOG = LoggerFactory.getLogger(SlowConsumer.class);
 
     public SlowConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
         super(fac, dest, consumerName);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/plugin/BrokerStatisticsPluginTest.java Thu Feb 10 14:24:01 2011
@@ -20,8 +20,8 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerPlugin;
 import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import java.net.URI;
 import java.util.Enumeration;
 import javax.jms.Connection;
@@ -40,7 +40,7 @@ import junit.framework.TestCase;
  *
  */
 public class BrokerStatisticsPluginTest extends TestCase{
-    private static final Log LOG = LogFactory.getLog(BrokerStatisticsPluginTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BrokerStatisticsPluginTest.class);
     
     private Connection connection;
     private BrokerService broker;
@@ -125,4 +125,4 @@ public class BrokerStatisticsPluginTest 
         LOG.info("Loading broker configuration from the classpath with URI: " + uri);
         return BrokerFactory.createBroker(new URI("xbean:" + uri));
     }
-}
\ No newline at end of file
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityJMXTest.java Thu Feb 10 14:24:01 2011
@@ -39,12 +39,12 @@ import org.apache.activemq.broker.Broker
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.jmx.QueueViewMBean;
 import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SecurityJMXTest extends TestCase {
 	
-	private static final Log LOG = LogFactory.getLog(SimpleAuthenticationPluginTest.class);
+	private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class);
 	private BrokerService broker; 
 	
 	public void setUp() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java Thu Feb 10 14:24:01 2011
@@ -25,12 +25,12 @@ import org.apache.activemq.CombinationTe
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest {
 
-    private static final Log LOG = LogFactory.getLog(SimpleAnonymousPluginTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleAnonymousPluginTest.class);
 
     public static Test suite() {
         return suite(SimpleAnonymousPluginTest.class);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java?rev=1069405&r1=1069404&r2=1069405&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java Thu Feb 10 14:24:01 2011
@@ -34,12 +34,12 @@ import org.apache.activemq.broker.Broker
 import org.apache.activemq.broker.jmx.TopicViewMBean;
 import org.apache.activemq.command.ActiveMQMessage;
 import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SimpleAuthenticationPluginTest extends SecurityTestSupport {
 
-    private static final Log LOG = LogFactory.getLog(SimpleAuthenticationPluginTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(SimpleAuthenticationPluginTest.class);
 
     public static Test suite() {
         return suite(SimpleAuthenticationPluginTest.class);



Mime
View raw message