You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/08/09 18:40:08 UTC

svn commit: r564271 [16/18] - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/advisory/ activemq-core/src/main/java/org/apache/activemq/blob/ activemq-core/src/main/java/org/apache/ac...

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?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- 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 Aug  9 09:37:49 2007
@@ -28,7 +28,7 @@
  * @version $Revision: 1.3 $
  */
 public class SlowConsumer extends PerfConsumer {
-    private static final transient Log log = LogFactory.getLog(SlowConsumer.class);
+    private static final transient Log LOG = LogFactory.getLog(SlowConsumer.class);
 
     public SlowConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
         super(fac, dest, consumerName);
@@ -40,7 +40,7 @@
 
     public void onMessage(Message msg) {
         super.onMessage(msg);
-        log.debug("GOT A MSG " + msg);
+        LOG.debug("GOT A MSG " + msg);
         try {
             Thread.sleep(10000);
         } catch (InterruptedException e) {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * 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.perf;
 
 import javax.jms.ConnectionFactory;
@@ -31,14 +33,14 @@
 public class SlowConsumerTopicTest extends SimpleTopicTest {
 
     protected PerfConsumer[] slowConsumers;
-    protected int NUMBER_OF_SLOW_CONSUMERS = 1;
+    protected int numberOfSlowConsumers = 1;
 
     protected void setUp() throws Exception {
         numberOfConsumers = 0;
         playloadSize = 10 * 1024;
         super.setUp();
-        slowConsumers = new SlowConsumer[NUMBER_OF_SLOW_CONSUMERS];
-        for (int i = 0; i < NUMBER_OF_SLOW_CONSUMERS; i++) {
+        slowConsumers = new SlowConsumer[numberOfSlowConsumers];
+        for (int i = 0; i < numberOfSlowConsumers; i++) {
             slowConsumers[i] = createSlowConsumer(factory, destination, i);
             slowConsumers[i].start();
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * 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.perf;
 
 import javax.jms.ConnectionFactory;
@@ -24,7 +26,7 @@
 public class SlowDurableConsumerTopicTest extends SlowConsumerTopicTest {
 
     protected PerfConsumer[] slowConsumers;
-    protected int NUMBER_OF_SLOW_CONSUMERS = 1;
+    protected int numberOfSlowConsumers = 1;
 
     protected PerfConsumer createSlowConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException {
         return new SlowConsumer(fac, dest, "durableSlowConsumer" + number);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java Thu Aug  9 09:37:49 2007
@@ -29,18 +29,18 @@
  * @version $Revision$
  */
 public class AuthorizationMapTest extends TestCase {
-    static final GroupPrincipal guests = new GroupPrincipal("guests");
-    static final GroupPrincipal users = new GroupPrincipal("users");
-    static final GroupPrincipal admins = new GroupPrincipal("admins");
-    static final GroupPrincipal tempDestinationAdmins = new GroupPrincipal("tempDestAdmins");
+    static final GroupPrincipal GUESTS = new GroupPrincipal("guests");
+    static final GroupPrincipal USERS = new GroupPrincipal("users");
+    static final GroupPrincipal ADMINS = new GroupPrincipal("admins");
+    static final GroupPrincipal TEMP_DESTINATION_ADMINS = new GroupPrincipal("tempDestAdmins");
 
     public void testAuthorizationMap() {
         AuthorizationMap map = createAuthorizationMap();
 
         Set readACLs = map.getReadACLs(new ActiveMQQueue("USERS.FOO.BAR"));
         assertEquals("set size: " + readACLs, 2, readACLs.size());
-        assertTrue("Contains users group", readACLs.contains(admins));
-        assertTrue("Contains users group", readACLs.contains(users));
+        assertTrue("Contains users group", readACLs.contains(ADMINS));
+        assertTrue("Contains users group", readACLs.contains(USERS));
 
     }
 
@@ -49,12 +49,12 @@
 
         Set readACLs = map.getReadACLs(new ActiveMQQueue("USERS.FOO.BAR"));
         assertEquals("set size: " + readACLs, 2, readACLs.size());
-        assertTrue("Contains users group", readACLs.contains(admins));
-        assertTrue("Contains users group", readACLs.contains(users));
+        assertTrue("Contains users group", readACLs.contains(ADMINS));
+        assertTrue("Contains users group", readACLs.contains(USERS));
 
         Set tempAdminACLs = map.getTempDestinationAdminACLs();
         assertEquals("set size: " + tempAdminACLs, 1, tempAdminACLs.size());
-        assertTrue("Contains users group", tempAdminACLs.contains(tempDestinationAdmins));
+        assertTrue("Contains users group", tempAdminACLs.contains(TEMP_DESTINATION_ADMINS));
 
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java Thu Aug  9 09:37:49 2007
@@ -138,8 +138,9 @@
         }
 
         Message m = consumer.receive(1000);
-        if (fail)
+        if (fail) {
             assertNull(m);
+        }
         else {
             assertNotNull(m);
             assertEquals("0", ((TextMessage)m).getText());
@@ -158,11 +159,13 @@
         MessageConsumer consumer = null;
         try {
             consumer = session.createConsumer(destination);
-            if (fail)
+            if (fail) {
                 fail("Expected failure due to security constraint.");
+            }
         } catch (JMSException e) {
-            if (fail && e.getCause() instanceof SecurityException)
+            if (fail && e.getCause() instanceof SecurityException) {
                 return null;
+            }
             throw e;
         }
 

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?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- 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 Aug  9 09:37:49 2007
@@ -26,7 +26,7 @@
 
 public class SimpleAuthenticationPluginTest extends SecurityTestSupport {
 
-    private static final Log log = LogFactory.getLog(SimpleAuthenticationPluginTest.class);
+    private static final Log LOG = LogFactory.getLog(SimpleAuthenticationPluginTest.class);
 
     public static Test suite() {
         return suite(SimpleAuthenticationPluginTest.class);
@@ -41,7 +41,7 @@
     }
 
     protected BrokerService createBroker(String uri) throws Exception {
-        log.info("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: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java Thu Aug  9 09:37:49 2007
@@ -28,8 +28,11 @@
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.command.MessageSendTest;
 import org.apache.activemq.filter.DestinationMap;
 import org.apache.activemq.jaas.GroupPrincipal;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Tests that the broker allows/fails access to destinations based on the
@@ -38,10 +41,11 @@
  * @version $Revision$
  */
 public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport {
+    private static final Log LOG = LogFactory.getLog(SimpleSecurityBrokerSystemTest.class);
 
-    static final GroupPrincipal guests = new GroupPrincipal("guests");
-    static final GroupPrincipal users = new GroupPrincipal("users");
-    static final GroupPrincipal admins = new GroupPrincipal("admins");
+    static final GroupPrincipal GUESTS = new GroupPrincipal("guests");
+    static final GroupPrincipal USERS = new GroupPrincipal("users");
+    static final GroupPrincipal ADMINS = new GroupPrincipal("admins");
 
     public BrokerPlugin authorizationPlugin;
     public BrokerPlugin authenticationPlugin;
@@ -55,7 +59,7 @@
                 System.setProperty("java.security.auth.login.config", path);
             }
         }
-        log.info("Path to login config: " + path);
+        LOG.info("Path to login config: " + path);
     }
 
     public static Test suite() {
@@ -68,35 +72,35 @@
 
     public static AuthorizationMap createAuthorizationMap() {
         DestinationMap readAccess = new DestinationMap();
-        readAccess.put(new ActiveMQQueue(">"), admins);
-        readAccess.put(new ActiveMQQueue("USERS.>"), users);
-        readAccess.put(new ActiveMQQueue("GUEST.>"), guests);
-        readAccess.put(new ActiveMQTopic(">"), admins);
-        readAccess.put(new ActiveMQTopic("USERS.>"), users);
-        readAccess.put(new ActiveMQTopic("GUEST.>"), guests);
+        readAccess.put(new ActiveMQQueue(">"), ADMINS);
+        readAccess.put(new ActiveMQQueue("USERS.>"), USERS);
+        readAccess.put(new ActiveMQQueue("GUEST.>"), GUESTS);
+        readAccess.put(new ActiveMQTopic(">"), ADMINS);
+        readAccess.put(new ActiveMQTopic("USERS.>"), USERS);
+        readAccess.put(new ActiveMQTopic("GUEST.>"), GUESTS);
 
         DestinationMap writeAccess = new DestinationMap();
-        writeAccess.put(new ActiveMQQueue(">"), admins);
-        writeAccess.put(new ActiveMQQueue("USERS.>"), users);
-        writeAccess.put(new ActiveMQQueue("GUEST.>"), users);
-        writeAccess.put(new ActiveMQQueue("GUEST.>"), guests);
-        writeAccess.put(new ActiveMQTopic(">"), admins);
-        writeAccess.put(new ActiveMQTopic("USERS.>"), users);
-        writeAccess.put(new ActiveMQTopic("GUEST.>"), users);
-        writeAccess.put(new ActiveMQTopic("GUEST.>"), guests);
-
-        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), guests);
-        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), users);
-        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), guests);
-        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), users);
+        writeAccess.put(new ActiveMQQueue(">"), ADMINS);
+        writeAccess.put(new ActiveMQQueue("USERS.>"), USERS);
+        writeAccess.put(new ActiveMQQueue("GUEST.>"), USERS);
+        writeAccess.put(new ActiveMQQueue("GUEST.>"), GUESTS);
+        writeAccess.put(new ActiveMQTopic(">"), ADMINS);
+        writeAccess.put(new ActiveMQTopic("USERS.>"), USERS);
+        writeAccess.put(new ActiveMQTopic("GUEST.>"), USERS);
+        writeAccess.put(new ActiveMQTopic("GUEST.>"), GUESTS);
+
+        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), GUESTS);
+        readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), USERS);
+        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), GUESTS);
+        writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), USERS);
 
         DestinationMap adminAccess = new DestinationMap();
-        adminAccess.put(new ActiveMQTopic(">"), admins);
-        adminAccess.put(new ActiveMQTopic(">"), users);
-        adminAccess.put(new ActiveMQTopic(">"), guests);
-        adminAccess.put(new ActiveMQQueue(">"), admins);
-        adminAccess.put(new ActiveMQQueue(">"), users);
-        adminAccess.put(new ActiveMQQueue(">"), guests);
+        adminAccess.put(new ActiveMQTopic(">"), ADMINS);
+        adminAccess.put(new ActiveMQTopic(">"), USERS);
+        adminAccess.put(new ActiveMQTopic(">"), GUESTS);
+        adminAccess.put(new ActiveMQQueue(">"), ADMINS);
+        adminAccess.put(new ActiveMQQueue(">"), USERS);
+        adminAccess.put(new ActiveMQQueue(">"), GUESTS);
 
         return new SimpleAuthorizationMap(writeAccess, readAccess, adminAccess);
     }
@@ -110,9 +114,9 @@
             u.put("guest", "password");
 
             HashMap groups = new HashMap();
-            groups.put("system", new HashSet(Arrays.asList(new Object[] { admins, users })));
-            groups.put("user", new HashSet(Arrays.asList(new Object[] { users })));
-            groups.put("guest", new HashSet(Arrays.asList(new Object[] { guests })));
+            groups.put("system", new HashSet(Arrays.asList(new Object[] { ADMINS, USERS })));
+            groups.put("user", new HashSet(Arrays.asList(new Object[] { USERS })));
+            groups.put("guest", new HashSet(Arrays.asList(new Object[] { GUESTS })));
 
             return new SimpleAuthenticationBroker(broker, u, groups);
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java Thu Aug  9 09:37:49 2007
@@ -30,7 +30,7 @@
  */
 public class XBeanSecurityTest extends SecurityTestSupport {
 
-    private static final Log log = LogFactory.getLog(XBeanSecurityTest.class);
+    private static final Log LOG = LogFactory.getLog(XBeanSecurityTest.class);
     
     public static Test suite() {
         return suite(XBeanSecurityTest.class);
@@ -46,7 +46,7 @@
     }
 
     protected BrokerService createBroker(String uri) throws Exception {
-        log.info("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: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorParserTest.java Thu Aug  9 09:37:49 2007
@@ -23,17 +23,20 @@
 import org.apache.activemq.filter.LogicExpression;
 import org.apache.activemq.filter.PropertyExpression;
 import org.apache.activemq.filter.XPathExpression;
+import org.apache.activemq.spring.ConsumerBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.2 $
  */
 public class SelectorParserTest extends TestCase {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SelectorParserTest.class);
+    private static final Log LOG = LogFactory.getLog(SelectorParserTest.class);
 
     public void testParseXPath() throws Exception {
         BooleanExpression filter = parse("XPATH '//title[@lang=''eng'']'");
         assertTrue("Created XPath expression", filter instanceof XPathExpression);
-        log.info("Expression: " + filter);
+        LOG.info("Expression: " + filter);
     }
 
     public void testParseWithParensAround() throws Exception {
@@ -41,7 +44,7 @@
 
         for (int i = 0; i < values.length; i++) {
             String value = values[i];
-            log.info("Parsing: " + value);
+            LOG.info("Parsing: " + value);
 
             BooleanExpression andExpression = parse(value);
             assertTrue("Created LogicExpression expression", andExpression instanceof LogicExpression);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/ConsumerBean.java Thu Aug  9 09:37:49 2007
@@ -22,10 +22,13 @@
 import javax.jms.Message;
 import javax.jms.MessageListener;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import junit.framework.Assert;
 
 public class ConsumerBean extends Assert implements MessageListener {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ConsumerBean.class);
+    private static final Log LOG = LogFactory.getLog(ConsumerBean.class);
     private List messages = new ArrayList();
     private Object semaphore;
     private boolean verbose;
@@ -63,7 +66,7 @@
     public synchronized void onMessage(Message message) {
         messages.add(message);
         if (verbose) {
-            log.info("Received: " + message);
+            LOG.info("Received: " + message);
         }
         synchronized (semaphore) {
             semaphore.notifyAll();
@@ -74,7 +77,7 @@
      * Use to wait for a single message to arrive.
      */
     public void waitForMessageToArrive() {
-        log.info("Waiting for message to arrive");
+        LOG.info("Waiting for message to arrive");
 
         long start = System.currentTimeMillis();
 
@@ -85,11 +88,11 @@
                 }
             }
         } catch (InterruptedException e) {
-            log.info("Caught: " + e);
+            LOG.info("Caught: " + e);
         }
         long end = System.currentTimeMillis() - start;
 
-        log.info("End of wait for " + end + " millis");
+        LOG.info("End of wait for " + end + " millis");
     }
 
     /**
@@ -98,7 +101,7 @@
      * @param messageCount
      */
     public void waitForMessagesToArrive(int messageCount) {
-        log.info("Waiting for message to arrive");
+        LOG.info("Waiting for message to arrive");
 
         long start = System.currentTimeMillis();
 
@@ -111,12 +114,12 @@
                     semaphore.wait(1000);
                 }
             } catch (InterruptedException e) {
-                log.info("Caught: " + e);
+                LOG.info("Caught: " + e);
             }
         }
         long end = System.currentTimeMillis() - start;
 
-        log.info("End of wait for " + end + " millis");
+        LOG.info("End of wait for " + end + " millis");
     }
 
     public void assertMessagesArrived(int total) {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringConsumer.java Thu Aug  9 09:37:49 2007
@@ -30,7 +30,7 @@
 import org.springframework.jms.core.JmsTemplate;
 
 public class SpringConsumer extends ConsumerBean implements MessageListener {
-    private static final Log log = LogFactory.getLog(SpringConsumer.class);
+    private static final Log LOG = LogFactory.getLog(SpringConsumer.class);
     private JmsTemplate template;
     private String myId = "foo";
     private Destination destination;
@@ -59,7 +59,7 @@
             consumer = session.createConsumer(destination, selector, false);
             consumer.setMessageListener(this);
         } catch (JMSException ex) {
-            log.error("", ex);
+            LOG.error("", ex);
             throw ex;
         }
     }
@@ -81,7 +81,7 @@
         try {
             message.acknowledge();
         } catch (JMSException e) {
-            log.error("Failed to acknowledge: " + e, e);
+            LOG.error("Failed to acknowledge: " + e, e);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringProducer.java Thu Aug  9 09:37:49 2007
@@ -22,12 +22,13 @@
 import javax.jms.Session;
 import javax.jms.TextMessage;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
 
 public class SpringProducer {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(SpringProducer.class);
+    private static final Log LOG = LogFactory.getLog(SpringProducer.class);
     private JmsTemplate template;
     private Destination destination;
     private int messageCount = 10;
@@ -37,7 +38,7 @@
             final String text = "Text for message: " + i;
             template.send(destination, new MessageCreator() {
                 public Message createMessage(Session session) throws JMSException {
-                    log.info("Sending message: " + text);
+                    LOG.info("Sending message: " + text);
                     TextMessage message = session.createTextMessage(text);
                     message.setStringProperty("next", "foo");
                     return message;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/spring/SpringTestSupport.java Thu Aug  9 09:37:49 2007
@@ -20,6 +20,9 @@
 import java.util.List;
 
 import junit.framework.TestCase;
+import org.apache.activemq.test.JmsTopicSendReceiveTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -27,7 +30,7 @@
  * @version $Revision: 1.1 $
  */
 public class SpringTestSupport extends TestCase {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SpringTest.class);
+    private static final Log LOG = LogFactory.getLog(SpringTest.class);
     protected AbstractApplicationContext context;
     protected SpringConsumer consumer;
     protected SpringProducer producer;
@@ -62,10 +65,10 @@
 
         // now lets check that the consumer has received some messages
         List messages = consumer.flushMessages();
-        log.info("Consumer has received messages....");
+        LOG.info("Consumer has received messages....");
         for (Iterator iter = messages.iterator(); iter.hasNext();) {
             Object message = iter.next();
-            log.info("Received: " + message);
+            LOG.info("Received: " + message);
         }
 
         assertEquals("Message count", producer.getMessageCount(), messages.size());

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/streams/JMSInputStreamTest.java Thu Aug  9 09:37:49 2007
@@ -91,22 +91,22 @@
     }
 
     public void testLarge() throws Exception {
-        final int TEST_DATA = 23;
-        final int DATA_LENGTH = 4096;
-        final int COUNT = 1024;
-        byte[] data = new byte[DATA_LENGTH];
+        final int testData = 23;
+        final int dataLength = 4096;
+        final int count = 1024;
+        byte[] data = new byte[dataLength];
         for (int i = 0; i < data.length; i++) {
-            data[i] = TEST_DATA;
+            data[i] = testData;
         }
         final AtomicBoolean complete = new AtomicBoolean(false);
         Thread runner = new Thread(new Runnable() {
             public void run() {
                 try {
-                    for (int x = 0; x < COUNT; x++) {
+                    for (int x = 0; x < count; x++) {
                         byte[] b = new byte[2048];
                         in.readFully(b);
                         for (int i = 0; i < b.length; i++) {
-                            assertTrue(b[i] == TEST_DATA);
+                            assertTrue(b[i] == testData);
                         }
                     }
                     complete.set(true);
@@ -119,7 +119,7 @@
             }
         });
         runner.start();
-        for (int i = 0; i < COUNT; i++) {
+        for (int i = 0; i < count; i++) {
             out.write(data);
         }
         out.flush();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsResourceProvider.java Thu Aug  9 09:37:49 2007
@@ -112,10 +112,11 @@
      *      java.lang.String)
      */
     public Destination createDestination(Session session, String name) throws JMSException {
-        if (isTopic)
+        if (isTopic) {
             return session.createTopic("TOPIC." + name);
-        else
+        } else {
             return session.createQueue("QUEUE." + name);
+        }
     }
 
     /**

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java Thu Aug  9 09:37:49 2007
@@ -40,7 +40,7 @@
  * @version $Revision: 1.2 $
  */
 public abstract class JmsSendReceiveTestSupport extends TestSupport implements MessageListener {
-    protected static final Log LOG = LogFactory.getLog(JmsSendReceiveTestSupport.class);
+    private static final Log LOG = LogFactory.getLog(JmsSendReceiveTestSupport.class);
 
     protected int messageCount = 100;
     protected String[] data;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java Thu Aug  9 09:37:49 2007
@@ -23,11 +23,14 @@
 import javax.jms.Session;
 import javax.jms.Topic;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * @version $Revision: 1.2 $
  */
 public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport {
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(JmsTopicSendReceiveTest.class);
+    private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveTest.class);
 
     protected Connection connection;
 
@@ -40,17 +43,17 @@
             connection.setClientID(getClass().getName());
         }
 
-        log.info("Created connection: " + connection);
+        LOG.info("Created connection: " + connection);
 
         session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         consumeSession = createConsumerSession();
 
-        log.info("Created session: " + session);
-        log.info("Created consumeSession: " + consumeSession);
+        LOG.info("Created session: " + session);
+        LOG.info("Created consumeSession: " + consumeSession);
         producer = session.createProducer(null);
         producer.setDeliveryMode(deliveryMode);
 
-        log.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
+        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
 
         if (topic) {
             consumerDestination = session.createTopic(getConsumerSubject());
@@ -60,13 +63,13 @@
             producerDestination = session.createQueue(getProducerSubject());
         }
 
-        log.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        log.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
+        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
+        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
         consumer = createConsumer();
         consumer.setMessageListener(this);
         startConnection();
 
-        log.info("Created connection: " + connection);
+        LOG.info("Created connection: " + connection);
     }
 
     protected void startConnection() throws JMSException {
@@ -74,11 +77,11 @@
     }
 
     protected void tearDown() throws Exception {
-        log.info("Dumping stats...");
+        LOG.info("Dumping stats...");
         // TODO
         // connectionFactory.getFactoryStats().dump(new IndentPrinter());
 
-        log.info("Closing down connection");
+        LOG.info("Closing down connection");
 
         /** TODO we should be able to shut down properly */
         session.close();
@@ -107,7 +110,7 @@
      */
     protected MessageConsumer createConsumer() throws JMSException {
         if (durable) {
-            log.info("Creating durable consumer");
+            LOG.info("Creating durable consumer");
             return consumeSession.createDurableSubscriber((Topic)consumerDestination, getName());
         }
         return consumeSession.createConsumer(consumerDestination);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.java Thu Aug  9 09:37:49 2007
@@ -24,16 +24,18 @@
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.security.SimpleSecurityBrokerSystemTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
- * 
  * @version $Revision: 1.1 $
  */
-public class JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest extends
-        JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
+public class JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
+    private static final Log log = LogFactory.getLog(JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest.class);
 
     protected String userName = "James";
-    
+
     protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
         ActiveMQConnectionFactory answer = super.createConnectionFactory();
         answer.setUserName(userName);
@@ -50,7 +52,7 @@
 
         // lets assert that the user ID is set
         for (Iterator iter = receivedMessages.iterator(); iter.hasNext();) {
-            Message message = (Message) iter.next();
+            Message message = (Message)iter.next();
             String userID = message.getStringProperty("JMSXUserID");
 
             log.info("Received message with userID: " + userID);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java Thu Aug  9 09:37:49 2007
@@ -31,7 +31,7 @@
  */
 public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTestSupport {
 
-    protected static final Log log = LogFactory.getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class);
+    private static final Log LOG = LogFactory.getLog(JmsTopicSendReceiveWithTwoConnectionsTest.class);
 
     protected Connection sendConnection;
     protected Connection receiveConnection;
@@ -47,29 +47,29 @@
 
         connectionFactory = createConnectionFactory();
 
-        log.info("Creating send connection");
+        LOG.info("Creating send connection");
         sendConnection = createSendConnection();
-        log.info("Starting send connection");
+        LOG.info("Starting send connection");
         sendConnection.start();
 
-        log.info("Creating receive connection");
+        LOG.info("Creating receive connection");
         receiveConnection = createReceiveConnection();
-        log.info("Starting receive connection");
+        LOG.info("Starting receive connection");
         receiveConnection.start();
 
-        log.info("Created sendConnection: " + sendConnection);
-        log.info("Created receiveConnection: " + receiveConnection);
+        LOG.info("Created sendConnection: " + sendConnection);
+        LOG.info("Created receiveConnection: " + receiveConnection);
 
         session = sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         receiveSession = receiveConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
-        log.info("Created sendSession: " + session);
-        log.info("Created receiveSession: " + receiveSession);
+        LOG.info("Created sendSession: " + session);
+        LOG.info("Created receiveSession: " + receiveSession);
 
         producer = session.createProducer(null);
         producer.setDeliveryMode(deliveryMode);
 
-        log.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
+        LOG.info("Created producer: " + producer + " delivery mode = " + (deliveryMode == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON_PERSISTENT"));
 
         if (topic) {
             consumerDestination = session.createTopic(getConsumerSubject());
@@ -79,13 +79,13 @@
             producerDestination = session.createQueue(getProducerSubject());
         }
 
-        log.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
-        log.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
+        LOG.info("Created  consumer destination: " + consumerDestination + " of type: " + consumerDestination.getClass());
+        LOG.info("Created  producer destination: " + producerDestination + " of type: " + producerDestination.getClass());
 
         consumer = createConsumer();
         consumer.setMessageListener(this);
 
-        log.info("Started connections");
+        LOG.info("Started connections");
     }
 
     protected MessageConsumer createConsumer() throws JMSException {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TemporaryDestinationToFromNameTest.java Thu Aug  9 09:37:49 2007
@@ -21,11 +21,17 @@
 import javax.jms.Topic;
 
 import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
+import org.apache.activemq.broker.jmx.PurgeTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1 $
  */
 public class TemporaryDestinationToFromNameTest extends EmbeddedBrokerAndConnectionTestSupport {
+
+    private static final Log LOG = LogFactory.getLog(TemporaryDestinationToFromNameTest.class);
+
     public void testCreateTemporaryQueueThenCreateAQueueFromItsName() throws Exception {
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java Thu Aug  9 09:37:49 2007
@@ -39,7 +39,8 @@
  * @version $Revision: 1.4 $
  */
 public abstract class TestSupport extends TestCase {
-    final static protected Log log = LogFactory.getLog(TestSupport.class);
+    private static final Log LOG = LogFactory.getLog(TestSupport.class);
+    
     protected ActiveMQConnectionFactory connectionFactory;
     protected boolean topic = true;
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapAndListPropertyTest.java Thu Aug  9 09:37:49 2007
@@ -35,7 +35,7 @@
  */
 public class NestedMapAndListPropertyTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
 
-    private static final Log log = LogFactory.getLog(NestedMapAndListPropertyTest.class);
+    private static final Log LOG = LogFactory.getLog(NestedMapAndListPropertyTest.class);
 
     protected void assertMessageValid(int index, Message message) throws JMSException {
         Object value = message.getObjectProperty("textField");
@@ -55,13 +55,13 @@
         value = map.get("y");
         assertTrue("mapField.d.y is a List", value instanceof List);
         List list = (List) value;
-        log.debug("mapField.d.y: " + list);
+        LOG.debug("mapField.d.y: " + list);
         assertEquals("listField.size", 3, list.size());
 
-        log.debug("Found map: " + map);
+        LOG.debug("Found map: " + map);
 
         list = (List) message.getObjectProperty("listField");
-        log.debug("listField: " + list);
+        LOG.debug("listField: " + list);
         assertEquals("listField.size", 3, list.size());
         assertEquals("listField[0]", "a", list.get(0));
         assertEquals("listField[1]", "b", list.get(1));

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/message/NestedMapMessageTest.java Thu Aug  9 09:37:49 2007
@@ -35,7 +35,7 @@
  */
 public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest {
 
-    private static final Log log = LogFactory.getLog(NestedMapMessageTest.class);
+    private static final Log LOG = LogFactory.getLog(NestedMapMessageTest.class);
 
     protected void assertMessageValid(int index, Message message) throws JMSException {
         assertTrue("Should be a MapMessage: " + message, message instanceof MapMessage);
@@ -59,13 +59,13 @@
         value = map.get("y");
         assertTrue("mapField.d.y is a List", value instanceof List);
         List list = (List) value;
-        log.debug("mapField.d.y: " + list);
+        LOG.debug("mapField.d.y: " + list);
         assertEquals("listField.size", 3, list.size());
 
-        log.debug("Found map: " + map);
+        LOG.debug("Found map: " + map);
 
         list = (List) mapMessage.getObject("listField");
-        log.debug("listField: " + list);
+        LOG.debug("listField: " + list);
         assertEquals("listField.size", 3, list.size());
         assertEquals("listField[0]", "a", list.get(0));
         assertEquals("listField[1]", "b", list.get(1));

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java Thu Aug  9 09:37:49 2007
@@ -31,13 +31,13 @@
  */
 public class DummyMessageQuery implements MessageQuery {
     
-    protected static final Log log = LogFactory.getLog(DummyMessageQuery.class);
+    private static final Log LOG = LogFactory.getLog(DummyMessageQuery.class);
 
-    public static final int messageCount = 10;
+    public static final int MESSAGE_COUNT = 10;
     
     public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception {
-        log.info("Initial query is creating: " + messageCount + " messages");
-        for (int i = 0; i < messageCount; i++) {
+        LOG.info("Initial query is creating: " + MESSAGE_COUNT + " messages");
+        for (int i = 0; i < MESSAGE_COUNT; i++) {
             ActiveMQTextMessage message = new ActiveMQTextMessage();
             message.setText("Initial message: " + i + " loaded from query");
             listener.onMessage(message);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithSimpleMessageListTest.java Thu Aug  9 09:37:49 2007
@@ -31,12 +31,17 @@
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.test.TemporaryDestinationToFromNameTest;
 import org.apache.activemq.util.MessageIdList;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1 $
  */
 public class RetroactiveConsumerTestWithSimpleMessageListTest extends EmbeddedBrokerTestSupport {
+    private static final Log LOG = LogFactory.getLog(RetroactiveConsumerTestWithSimpleMessageListTest.class);
+
     protected int messageCount = 20;
     protected Connection connection;
     protected Session session;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerWithMessageQueryTest.java Thu Aug  9 09:37:49 2007
@@ -30,12 +30,17 @@
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.usecases.CreateLotsOfTemporaryQueuesTest;
 import org.apache.activemq.util.MessageIdList;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision$
  */
 public class RetroactiveConsumerWithMessageQueryTest extends EmbeddedBrokerTestSupport {
+    private static final Log LOG = LogFactory.getLog(RetroactiveConsumerWithMessageQueryTest.class);
+    
     protected int messageCount = 20;
     protected Connection connection;
     protected Session session;
@@ -53,7 +58,7 @@
         consumer.setMessageListener(listener);
 
         MessageProducer producer = session.createProducer(destination);
-        int updateMessageCount = messageCount - DummyMessageQuery.messageCount;
+        int updateMessageCount = messageCount - DummyMessageQuery.MESSAGE_COUNT;
         for (int i = 0; i < updateMessageCount; i++) {
             TextMessage message = session.createTextMessage("Update Message: " + i + " sent at: " + new Date());
             producer.send(message);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java Thu Aug  9 09:37:49 2007
@@ -28,7 +28,7 @@
 import org.apache.commons.logging.LogFactory;
 
 public class DelegatingTransactionalMessageListener implements MessageListener {
-    private static final transient Log log = LogFactory.getLog(DelegatingTransactionalMessageListener.class);
+    private static final transient Log LOG = LogFactory.getLog(DelegatingTransactionalMessageListener.class);
 
     private final MessageListener underlyingListener;
     private boolean transacted = true;
@@ -60,7 +60,7 @@
         try {
             session.rollback();
         } catch (JMSException e) {
-            log.error("Failed to rollback: " + e, e);
+            LOG.error("Failed to rollback: " + e, e);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java Thu Aug  9 09:37:49 2007
@@ -38,7 +38,7 @@
  */
 public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSupport implements MessageListener {
 
-    private static final transient Log log = LogFactory.getLog(RollbacksWhileConsumingLargeQueueTest.class);
+    private static final transient Log LOG = LogFactory.getLog(RollbacksWhileConsumingLargeQueueTest.class);
 
     protected int numberOfMessagesOnQueue = 6500;
     private Connection connection;
@@ -59,12 +59,14 @@
             }
 
             // Are we done receiving all the messages.
-            if (ackCounter.get() == numberOfMessagesOnQueue)
+            if (ackCounter.get() == numberOfMessagesOnQueue) {
                 return;
+            }
 
             Message message = consumer.receive(1000);
-            if (message == null)
+            if (message == null) {
                 continue;
+            }
 
             try {
                 onMessage(message);
@@ -89,7 +91,7 @@
             }
 
             if (latch.await(1, TimeUnit.SECONDS)) {
-                log.debug("Received: " + deliveryCounter.get() + "  message(s)");
+                LOG.debug("Received: " + deliveryCounter.get() + "  message(s)");
                 return;
             }
 
@@ -147,11 +149,11 @@
 
         int value = deliveryCounter.incrementAndGet();
         if (value % 2 == 0) {
-            log.info("Rolling Back message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
+            LOG.info("Rolling Back message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
             throw new RuntimeException("Dummy exception on message: " + value);
         }
 
-        log.info("Received message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
+        LOG.info("Received message: " + ackCounter.get() + " id: " + msgId + ", content: " + msgText);
         ackCounter.incrementAndGet();
         latch.countDown();
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/thread/TaskRunnerTest.java Thu Aug  9 09:37:49 2007
@@ -22,11 +22,14 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.activemq.transport.TopicClusterTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import junit.framework.TestCase;
 
 public class TaskRunnerTest extends TestCase {
-
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TaskRunnerTest.class);
+    private static final Log LOG = LogFactory.getLog(TaskRunnerTest.class);
 
     public void testWakeupPooled() throws InterruptedException, BrokenBarrierException {
         System.setProperty("org.apache.activemq.UseDedicatedTaskRunner", "false");
@@ -47,11 +50,11 @@
      */
     public void doTestWakeup() throws InterruptedException, BrokenBarrierException {
 
+        final int enqueueCount = 100000;
         final AtomicInteger iterations = new AtomicInteger(0);
         final AtomicInteger counter = new AtomicInteger(0);
         final AtomicInteger queue = new AtomicInteger(0);
         final CountDownLatch doneCountDownLatch = new CountDownLatch(1);
-        final int ENQUEUE_COUNT = 100000;
 
         TaskRunnerFactory factory = new TaskRunnerFactory();
         final TaskRunner runner = factory.createTaskRunner(new Task() {
@@ -64,22 +67,23 @@
                         counter.incrementAndGet();
                     }
                     iterations.incrementAndGet();
-                    if (counter.get() == ENQUEUE_COUNT)
+                    if (counter.get() == enqueueCount) {
                         doneCountDownLatch.countDown();
+                    }
                     return true;
                 }
             }
         }, "Thread Name");
 
         long start = System.currentTimeMillis();
-        final int WORKER_COUNT = 5;
-        final CyclicBarrier barrier = new CyclicBarrier(WORKER_COUNT + 1);
-        for (int i = 0; i < WORKER_COUNT; i++) {
+        final int workerCount = 5;
+        final CyclicBarrier barrier = new CyclicBarrier(workerCount + 1);
+        for (int i = 0; i < workerCount; i++) {
             new Thread() {
                 public void run() {
                     try {
                         barrier.await();
-                        for (int i = 0; i < ENQUEUE_COUNT / WORKER_COUNT; i++) {
+                        for (int i = 0; i < enqueueCount / workerCount; i++) {
                             queue.incrementAndGet();
                             runner.wakeup();
                             yield();
@@ -94,10 +98,10 @@
 
         boolean b = doneCountDownLatch.await(30, TimeUnit.SECONDS);
         long end = System.currentTimeMillis();
-        log.info("Iterations: " + iterations.get());
-        log.info("counter: " + counter.get());
-        log.info("Dequeues/s: " + (1000.0 * ENQUEUE_COUNT / (end - start)));
-        log.info("duration: " + ((end - start) / 1000.0));
+        LOG.info("Iterations: " + iterations.get());
+        LOG.info("counter: " + counter.get());
+        LOG.info("Dequeues/s: " + (1000.0 * enqueueCount / (end - start)));
+        LOG.info("duration: " + ((end - start) / 1000.0));
         assertTrue(b);
 
         runner.shutdown();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java Thu Aug  9 09:37:49 2007
@@ -48,12 +48,14 @@
  * @version $Revision$
  */
 public class TopicClusterTest extends TestCase implements MessageListener {
-    protected final static Log log = LogFactory.getLog(TopicClusterTest.class);
+    
+    private static final Log LOG = LogFactory.getLog(TopicClusterTest.class);
+    protected static final int MESSAGE_COUNT = 50;
+    protected static final int NUMBER_IN_CLUSTER = 3;
+    
     protected Destination destination;
     protected boolean topic = true;
     protected AtomicInteger receivedMessageCount = new AtomicInteger(0);
-    protected static final int MESSAGE_COUNT = 50;
-    protected static final int NUMBER_IN_CLUSTER = 3;
     protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
     protected MessageProducer[] producers;
     protected Connection[] connections;
@@ -82,7 +84,7 @@
                 consumer.setMessageListener(this);
 
             }
-            log.info("Sleeping to ensure cluster is fully connected");
+            LOG.info("Sleeping to ensure cluster is fully connected");
             Thread.sleep(5000);
         } finally {
             System.setProperty("activemq.store.dir", root);
@@ -169,7 +171,7 @@
         }
         // sleep a little - to check we don't get too many messages
         Thread.sleep(2000);
-        log.info("GOT: " + receivedMessageCount.get());
+        LOG.info("GOT: " + receivedMessageCount.get());
         assertEquals("Expected message count not correct", expectedReceiveCount(), receivedMessageCount.get());
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java Thu Aug  9 09:37:49 2007
@@ -26,7 +26,7 @@
 import org.apache.activemq.broker.StubConnection;
 import org.apache.activemq.broker.TransportConnector;
 
-abstract public class TransportBrokerTestSupport extends BrokerTest {
+public abstract class TransportBrokerTestSupport extends BrokerTest {
 
     private TransportConnector connector;
     ArrayList connections = new ArrayList();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
 
 public class DiscoveryTransportBrokerTest extends NetworkTestSupport {
 
-    static final private Log log = LogFactory.getLog(DiscoveryTransportBrokerTest.class);
+    private static final Log LOG = LogFactory.getLog(DiscoveryTransportBrokerTest.class);
 
     public void setUp() throws Exception {
         super.setAutoFail(true);
@@ -103,10 +103,10 @@
         assertNoMessagesLeft(connectionB);
 
         // Dispose the server so that it fails over to the other server.
-        log.info("Disconnecting active server");
+        LOG.info("Disconnecting active server");
         serverA.stop();
 
-        log.info("Sending request that should failover");
+        LOG.info("Sending request that should failover");
         connection3.request(createMessage(producerInfo3, destination, deliveryMode));
 
         assertNotNull(receiveMessage(connectionB));

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java Thu Aug  9 09:37:49 2007
@@ -32,7 +32,7 @@
  */
 public class BadConnectionTest extends TestCase {
 
-    protected static final Log log = LogFactory.getLog(BadConnectionTest.class);
+    private static final Log LOG = LogFactory.getLog(BadConnectionTest.class);
 
     protected Transport transport;
 
@@ -41,7 +41,7 @@
             transport.asyncRequest(new ActiveMQMessage(), null);
             fail("This should never succeed");
         } catch (IOException e) {
-            log.info("Caught expected exception: " + e, e);
+            LOG.info("Caught expected exception: " + e, e);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java Thu Aug  9 09:37:49 2007
@@ -28,13 +28,14 @@
 import org.apache.activemq.ActiveMQPrefetchPolicy;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.network.NetworkTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class FailoverConsumerTest extends NetworkTestSupport {
 
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-        .getLog(FailoverConsumerTest.class);
-
     public static final int MSG_COUNT = 100;
+    private static final Log LOG = LogFactory.getLog(FailoverConsumerTest.class);
+
 
     public void testPublisherFailsOver() throws Exception {
         // Uncomment this if you want to use remote broker created by
@@ -70,7 +71,7 @@
         // after restart, javadoc says, that messages should be received
         // though).
         // So we must use external broker ant restart it manually.
-        log.info("You should restart remote broker now and press enter!");
+        LOG.info("You should restart remote broker now and press enter!");
         System.in.read();
         // Thread.sleep(20000);
         restartRemoteBroker();
@@ -80,7 +81,7 @@
         for (int idx = 1; idx < MSG_COUNT; ++idx) {
             msg = consumer.receive(3000);
             if (msg == null) {
-                log.error("No messages received! Received:" + count);
+                LOG.error("No messages received! Received:" + count);
                 break;
             }
             msg.acknowledge();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTransportBrokerTest.java Thu Aug  9 09:37:49 2007
@@ -33,10 +33,13 @@
 import org.apache.activemq.network.NetworkTestSupport;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
+import org.apache.activemq.transport.multicast.MulticastTransportTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class FailoverTransportBrokerTest extends NetworkTestSupport {
 
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(FailoverTransportBrokerTest.class);
+    private static final Log LOG = LogFactory.getLog(FailoverTransportBrokerTest.class);
 
     public ActiveMQDestination destination;
     public int deliveryMode;
@@ -67,7 +70,7 @@
         connection2.request(consumerInfo2);
 
         // Start a failover publisher.
-        log.info("Starting the failover connection.");
+        LOG.info("Starting the failover connection.");
         StubConnection connection3 = createFailoverConnection();
         ConnectionInfo connectionInfo3 = createConnectionInfo();
         SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
@@ -100,7 +103,7 @@
         assertNoMessagesLeft(connectionB);
 
         // Dispose the server so that it fails over to the other server.
-        log.info("Disconnecting the active connection");
+        LOG.info("Disconnecting the active connection");
         serverA.stop();
 
         connection3.request(createMessage(producerInfo3, destination, deliveryMode));

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java Thu Aug  9 09:37:49 2007
@@ -1,12 +1,12 @@
 /**
+ * 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
  *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -48,10 +48,11 @@
  */
 public class ReconnectTest extends TestCase {
 
-    protected static final Log log = LogFactory.getLog(ReconnectTest.class);
-
     public static final int MESSAGES_PER_ITTERATION = 10;
     public static final int WORKER_COUNT = 10;
+
+    private static final Log LOG = LogFactory.getLog(ReconnectTest.class);
+
     private BrokerService bs;
     private URI tcpUri;
     private AtomicInteger interruptedCount = new AtomicInteger();
@@ -161,20 +162,20 @@
 
         for (int k = 1; k < 5; k++) {
 
-            log.info("Test run: " + k);
+            LOG.info("Test run: " + k);
 
             // Wait for at least one iteration to occur...
             for (int i = 0; i < WORKER_COUNT; i++) {
                 for (int j = 0; workers[i].iterations.get() == 0 && j < 5; j++) {
                     workers[i].assertNoErrors();
-                    log.info("Waiting for worker " + i + " to finish an iteration.");
+                    LOG.info("Waiting for worker " + i + " to finish an iteration.");
                     Thread.sleep(1000);
                 }
                 assertTrue("Worker " + i + " never completed an interation.", workers[i].iterations.get() != 0);
                 workers[i].assertNoErrors();
             }
 
-            log.info("Simulating transport error to cause reconnect.");
+            LOG.info("Simulating transport error to cause reconnect.");
 
             // Simulate a transport failure.
             for (int i = 0; i < WORKER_COUNT; i++) {
@@ -183,12 +184,12 @@
 
             // Wait for the connections to get interrupted...
             while (interruptedCount.get() < WORKER_COUNT) {
-                log.info("Waiting for connections to get interrupted.. at: " + interruptedCount.get());
+                LOG.info("Waiting for connections to get interrupted.. at: " + interruptedCount.get());
                 Thread.sleep(1000);
             }
 
             // let things stablize..
-            log.info("Pausing before starting next iterations...");
+            LOG.info("Pausing before starting next iterations...");
             Thread.sleep(1000);
 
             // Reset the counters..

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
 
 public class FanoutTransportBrokerTest extends NetworkTestSupport {
 
-    private static final Log log = LogFactory.getLog(FanoutTransportBrokerTest.class);
+    private static final Log LOG = LogFactory.getLog(FanoutTransportBrokerTest.class);
 
     public ActiveMQDestination destination;
     public int deliveryMode;
@@ -83,7 +83,7 @@
         connection2.request(consumerInfo2);
 
         // Start a fanout publisher.
-        log.info("Starting the fanout connection.");
+        LOG.info("Starting the fanout connection.");
         StubConnection connection3 = createFanoutConnection();
         ConnectionInfo connectionInfo3 = createConnectionInfo();
         SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
@@ -129,7 +129,7 @@
         connection2.request(consumerInfo2);
 
         // Start a fanout publisher.
-        log.info("Starting the fanout connection.");
+        LOG.info("Starting the fanout connection.");
         final StubConnection connection3 = createFanoutConnection();
         ConnectionInfo connectionInfo3 = createConnectionInfo();
         SessionInfo sessionInfo3 = createSessionInfo(connectionInfo3);
@@ -154,7 +154,7 @@
         MockTransport mt = (MockTransport)connection3.getTransport().narrow(MockTransport.class);
         mt.install(new TransportFilter(mt.getNext()) {
             public void oneway(Object command) throws IOException {
-                log.info("Dropping: " + command);
+                LOG.info("Dropping: " + command);
                 // just eat it! to simulate a recent failure.
             }
         });

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java Thu Aug  9 09:37:49 2007
@@ -32,13 +32,13 @@
  */
 public class MulticastTransportTest extends UdpTransportTest {
     
-    protected static final Log log = LogFactory.getLog(MulticastTransportTest.class);
+    private static final Log LOG = LogFactory.getLog(MulticastTransportTest.class);
 
     private String multicastURI = "multicast://224.1.2.3:6255";
     
 
     protected Transport createProducer() throws Exception {
-        log.info("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: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/DropCommandStrategy.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java Thu Aug  9 09:37:49 2007
@@ -30,7 +30,7 @@
  */
 public class ReliableTransportTest extends TestCase {
 
-    protected static final Log log = LogFactory.getLog(ReliableTransportTest.class);
+    private static final Log LOG = LogFactory.getLog(ReliableTransportTest.class);
 
     protected ReliableTransport transport;
     protected StubTransportListener listener = new StubTransportListener();
@@ -49,7 +49,7 @@
         transport.setExpectedCounter(value);
 
         for (int i = 0; i < 10; i++) {
-            log.info("command: " + i + " = " + value);
+            LOG.info("command: " + i + " = " + value);
             sequenceNumbers[i] = value++;
         }
 
@@ -117,7 +117,7 @@
         } else {
             assertTrue("Should have received an exception!", exceptions.size() > 0);
             Exception e = (Exception)exceptions.remove();
-            log.info("Caught expected response: " + e);
+            LOG.info("Caught expected response: " + e);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -34,7 +34,7 @@
  */
 public class UnreliableCommandDatagramChannel extends CommandDatagramChannel {
 
-    private static final Log log = LogFactory.getLog(UnreliableCommandDatagramChannel.class);
+    private static final Log LOG = LogFactory.getLog(UnreliableCommandDatagramChannel.class);
 
     private DropCommandStrategy dropCommandStrategy;
 
@@ -48,7 +48,7 @@
     protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, boolean redelivery) throws IOException {
         if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) {
             writeBuffer.flip();
-            log.info("Dropping datagram with command: " + commandId);
+            LOG.info("Dropping datagram with command: " + commandId);
 
             // lets still add it to the replay buffer though!
             getReplayBuffer().addBuffer(commandId, writeBuffer);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -31,7 +31,7 @@
  * @version $Revision: $
  */
 public class UnreliableCommandDatagramSocket extends CommandDatagramSocket {
-    private static final Log log = LogFactory.getLog(UnreliableCommandDatagramSocket.class);
+    private static final Log LOG = LogFactory.getLog(UnreliableCommandDatagramSocket.class);
 
     private DropCommandStrategy dropCommandStrategy;
 
@@ -43,7 +43,7 @@
 
     protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery) throws IOException {
         if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) {
-            log.info("Dropping datagram with command: " + commandId);
+            LOG.info("Dropping datagram with command: " + commandId);
 
             // lets still add it to the replay buffer though!
             ReplayBuffer bufferCache = getReplayBuffer();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransportTest.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -20,17 +20,21 @@
 import java.net.URI;
 
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.test.JmsTopicSendReceiveWithEmbeddedBrokerAndUserIDTest;
 import org.apache.activemq.transport.CommandJoiner;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.udp.ResponseRedirectInterceptor;
 import org.apache.activemq.transport.udp.UdpTransport;
 import org.apache.activemq.transport.udp.UdpTransportTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 
  * @version $Revision: $
  */
 public class UnreliableUdpTransportTest extends UdpTransportTest {
+    private static final Log LOG = LogFactory.getLog(UnreliableUdpTransportTest.class);
 
     protected DropCommandStrategy dropStrategy = new DropCommandStrategy() {
         
@@ -43,7 +47,7 @@
     };
 
     protected Transport createProducer() throws Exception {
-        log.info("Producer using URI: " + producerURI);
+        LOG.info("Producer using URI: " + producerURI);
 
         OpenWireFormat wireFormat = createWireFormat();
         UnreliableUdpTransport transport = new UnreliableUdpTransport(wireFormat, new URI(producerURI));
@@ -57,7 +61,7 @@
     }
 
     protected Transport createConsumer() throws Exception {
-        log.info("Consumer on port: " + consumerPort);
+        LOG.info("Consumer on port: " + consumerPort);
         OpenWireFormat wireFormat = createWireFormat();
         UdpTransport transport = new UdpTransport(wireFormat, consumerPort);