activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564271 [11/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...
Date Thu, 09 Aug 2007 16:40:08 GMT
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
 import org.apache.commons.logging.LogFactory;
 
 public class TcpTransportFactory extends TransportFactory {
-    private static final Log log = LogFactory.getLog(TcpTransportFactory.class);
+    private static final Log LOG = LogFactory.getLog(TcpTransportFactory.class);
 
     public TransportServer doBind(String brokerId, final URI location) throws IOException {
         try {
@@ -117,7 +117,7 @@
                 String localString = location.getScheme() + ":/" + path;
                 localLocation = new URI(localString);
             } catch (Exception e) {
-                log.warn("path isn't a valid local location for TcpTransport to use", e);
+                LOG.warn("path isn't a valid local location for TcpTransport to use", e);
             }
         }
         SocketFactory socketFactory = createSocketFactory();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java Thu Aug  9 09:37:49 2007
@@ -50,7 +50,7 @@
 
 public class TcpTransportServer extends TransportServerThreadSupport {
 
-    private static final Log log = LogFactory.getLog(TcpTransportServer.class);
+    private static final Log LOG = LogFactory.getLog(TcpTransportServer.class);
     protected ServerSocket serverSocket;
     protected int backlog = 5000;
     protected WireFormatFactory wireFormatFactory = new OpenWireFormatFactory();
@@ -176,7 +176,7 @@
                 if (!isStopping()) {
                     onAcceptError(e);
                 } else if (!isStopped()) {
-                    log.warn("run()", e);
+                    LOG.warn("run()", e);
                     onAcceptError(e);
                 }
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java Thu Aug  9 09:37:49 2007
@@ -30,24 +30,24 @@
  */
 public interface CommandChannel extends Replayer, Service {
 
-    public Command read() throws IOException;
+    Command read() throws IOException;
 
-    public void write(Command command, SocketAddress address) throws IOException;
+    void write(Command command, SocketAddress address) throws IOException;
 
-    public int getDatagramSize();
+    int getDatagramSize();
 
     /**
      * Sets the default size of a datagram on the network.
      */
-    public void setDatagramSize(int datagramSize);
+    void setDatagramSize(int datagramSize);
 
-    public DatagramHeaderMarshaller getHeaderMarshaller();
+    DatagramHeaderMarshaller getHeaderMarshaller();
 
-    public void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller);
+    void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller);
 
-    public void setTargetAddress(SocketAddress address);
+    void setTargetAddress(SocketAddress address);
 
-    public void setReplayAddress(SocketAddress address);
+    void setReplayAddress(SocketAddress address);
 
-    public void setReplayBuffer(ReplayBuffer replayBuffer);
+    void setReplayBuffer(ReplayBuffer replayBuffer);
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramChannel.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
  */
 public class CommandDatagramChannel extends CommandChannelSupport {
 
-    private static final Log log = LogFactory.getLog(CommandDatagramChannel.class);
+    private static final Log LOG = LogFactory.getLog(CommandDatagramChannel.class);
 
     private DatagramChannel channel;
     private ByteBufferPool bufferPool;
@@ -103,8 +103,8 @@
         if (answer != null) {
             answer.setFrom(from);
 
-            if (log.isDebugEnabled()) {
-                log.debug("Channel: " + name + " received from: " + from + " about to process: " + answer);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Channel: " + name + " received from: " + from + " about to process: " + answer);
             }
         }
         return answer;
@@ -233,9 +233,9 @@
 
         writeBuffer.flip();
 
-        if (log.isDebugEnabled()) {
+        if (LOG.isDebugEnabled()) {
             String text = redelivery ? "REDELIVERING" : "sending";
-            log.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
+            LOG.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
         }
         channel.send(writeBuffer, address);
     }
@@ -245,8 +245,8 @@
             ByteBuffer writeBuffer = (ByteBuffer)buffer;
             sendWriteBuffer(commandId, getReplayAddress(), writeBuffer, true);
         } else {
-            if (log.isWarnEnabled()) {
-                log.warn("Request for buffer: " + commandId + " is no longer present");
+            if (LOG.isWarnEnabled()) {
+                LOG.warn("Request for buffer: " + commandId + " is no longer present");
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandDatagramSocket.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
  */
 public class CommandDatagramSocket extends CommandChannelSupport {
 
-    private static final Log log = LogFactory.getLog(CommandDatagramSocket.class);
+    private static final Log LOG = LogFactory.getLog(CommandDatagramSocket.class);
 
     private DatagramSocket channel;
     private Object readLock = new Object();
@@ -80,8 +80,8 @@
         if (answer != null) {
             answer.setFrom(from);
 
-            if (log.isDebugEnabled()) {
-                log.debug("Channel: " + name + " about to process: " + answer);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Channel: " + name + " about to process: " + answer);
             }
         }
         return answer;
@@ -201,9 +201,9 @@
             bufferCache.addBuffer(commandId, data);
         }
 
-        if (log.isDebugEnabled()) {
+        if (LOG.isDebugEnabled()) {
             String text = redelivery ? "REDELIVERING" : "sending";
-            log.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
+            LOG.debug("Channel: " + name + " " + text + " datagram: " + commandId + " to: " + address);
         }
         DatagramPacket packet = new DatagramPacket(data, 0, data.length, address);
         channel.send(packet);
@@ -214,8 +214,8 @@
             byte[] data = (byte[])buffer;
             sendWriteBuffer(commandId, replayAddress, data, true);
         } else {
-            if (log.isWarnEnabled()) {
-                log.warn("Request for buffer: " + commandId + " is no longer present");
+            if (LOG.isWarnEnabled()) {
+                LOG.warn("Request for buffer: " + commandId + " is no longer present");
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java Thu Aug  9 09:37:49 2007
@@ -22,7 +22,6 @@
 import org.apache.activemq.transport.TransportFilter;
 
 /**
- *
  * @version $Revision: $
  */
 public class ResponseRedirectInterceptor extends TransportFilter {
@@ -34,11 +33,11 @@
     }
 
     public void onCommand(Object o) {
-    	final Command command = (Command) o;
+        final Command command = (Command)o;
         // redirect to the endpoint that the last response came from
         Endpoint from = command.getFrom();
         transport.setTargetEndpoint(from);
-    
+
         super.onCommand(command);
     }
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java Thu Aug  9 09:37:49 2007
@@ -50,7 +50,7 @@
  * @version $Revision$
  */
 public class UdpTransport extends TransportThreadSupport implements Transport, Service, Runnable {
-    private static final Log log = LogFactory.getLog(UdpTransport.class);
+    private static final Log LOG = LogFactory.getLog(UdpTransport.class);
 
     private static final int MAX_BIND_ATTEMPTS = 50;
     private static final long BIND_ATTEMPT_DELAY = 100;
@@ -119,8 +119,8 @@
      * A one way asynchronous send to a given address
      */
     public void oneway(Object command, SocketAddress address) throws IOException {
-        if (log.isDebugEnabled()) {
-            log.debug("Sending oneway from: " + this + " to target: " + targetAddress + " command: " + command);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Sending oneway from: " + this + " to target: " + targetAddress + " command: " + command);
         }
         checkStarted();
         commandChannel.write((Command)command, address);
@@ -141,7 +141,7 @@
      * reads packets from a Socket
      */
     public void run() {
-        log.trace("Consumer thread starting for: " + toString());
+        LOG.trace("Consumer thread starting for: " + toString());
         while (!isStopped()) {
             try {
                 Command command = commandChannel.read();
@@ -151,34 +151,34 @@
                 try {
                     stop();
                 } catch (Exception e2) {
-                    log.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
+                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
                 }
             } catch (SocketException e) {
                 // DatagramSocket closed
-                log.debug("Socket closed: " + e, e);
+                LOG.debug("Socket closed: " + e, e);
                 try {
                     stop();
                 } catch (Exception e2) {
-                    log.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
+                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
                 }
             } catch (EOFException e) {
                 // DataInputStream closed
-                log.debug("Socket closed: " + e, e);
+                LOG.debug("Socket closed: " + e, e);
                 try {
                     stop();
                 } catch (Exception e2) {
-                    log.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
+                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
                 }
             } catch (Exception e) {
                 try {
                     stop();
                 } catch (Exception e2) {
-                    log.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
+                    LOG.warn("Caught in: " + this + " while closing: " + e2 + ". Now Closed", e2);
                 }
                 if (e instanceof IOException) {
                     onException((IOException)e);
                 } else {
-                    log.error("Caught: " + e, e);
+                    LOG.error("Caught: " + e, e);
                     e.printStackTrace();
                 }
             }
@@ -377,8 +377,8 @@
     protected void bind(DatagramSocket socket, SocketAddress localAddress) throws IOException {
         channel.configureBlocking(true);
 
-        if (log.isDebugEnabled()) {
-            log.debug("Binding to address: " + localAddress);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Binding to address: " + localAddress);
         }
 
         //
@@ -392,8 +392,9 @@
                 socket.bind(localAddress);
                 return;
             } catch (BindException e) {
-                if (i + 1 == MAX_BIND_ATTEMPTS)
+                if (i + 1 == MAX_BIND_ATTEMPTS) {
                     throw e;
+                }
                 try {
                     Thread.sleep(BIND_ATTEMPT_DELAY);
                 } catch (InterruptedException e1) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java Thu Aug  9 09:37:49 2007
@@ -46,7 +46,7 @@
  */
 
 public class UdpTransportServer extends TransportServerSupport {
-    private static final Log log = LogFactory.getLog(UdpTransportServer.class);
+    private static final Log LOG = LogFactory.getLog(UdpTransportServer.class);
 
     private UdpTransport serverTransport;
     private ReplayStrategy replayStrategy;
@@ -76,7 +76,7 @@
     }
 
     protected void doStart() throws Exception {
-        log.info("Starting " + this);
+        LOG.info("Starting " + this);
 
         configuredTransport.setTransportListener(new TransportListener() {
             public void onCommand(Object o) {
@@ -85,7 +85,7 @@
             }
 
             public void onException(IOException error) {
-                log.error("Caught: " + error, error);
+                LOG.error("Caught: " + error, error);
             }
 
             public void transportInterupted() {
@@ -103,30 +103,30 @@
 
     protected void processInboundConnection(Command command) {
         DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom();
-        if (log.isDebugEnabled()) {
-            log.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command);
         }
         Transport transport = null;
         synchronized (transports) {
             transport = (Transport)transports.get(endpoint);
             if (transport == null) {
                 if (usingWireFormatNegotiation && !command.isWireFormatInfo()) {
-                    log.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command);
+                    LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command);
                 } else {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Creating a new UDP server connection");
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Creating a new UDP server connection");
                     }
                     try {
                         transport = createTransport(command, endpoint);
                         transport = configureTransport(transport);
                         transports.put(endpoint, transport);
                     } catch (IOException e) {
-                        log.error("Caught: " + e, e);
+                        LOG.error("Caught: " + e, e);
                         getAcceptListener().onAcceptError(e);
                     }
                 }
             } else {
-                log.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command);
+                LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command);
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.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.transport.vm;
 
 import java.io.IOException;
@@ -39,9 +41,9 @@
  */
 public class VMTransport implements Transport, Task {
 
-    private static final Log log = LogFactory.getLog(VMTransport.class);
-    private static final AtomicLong nextId = new AtomicLong(0);
-    private static final TaskRunnerFactory taskRunnerFactory = new TaskRunnerFactory("VMTransport", Thread.NORM_PRIORITY, true, 1000);
+    private static final Log LOG = LogFactory.getLog(VMTransport.class);
+    private static final AtomicLong NEXT_ID = new AtomicLong(0);
+    private static final TaskRunnerFactory TASK_RUNNER_FACTORY = new TaskRunnerFactory("VMTransport", Thread.NORM_PRIORITY, true, 1000);
     protected VMTransport peer;
     protected TransportListener transportListener;
     protected boolean disposed;
@@ -49,7 +51,7 @@
     protected boolean network;
     protected boolean async = true;
     protected int asyncQueueDepth = 2000;
-    protected LinkedBlockingQueue messageQueue = null;
+    protected LinkedBlockingQueue messageQueue;
     protected boolean started;
     protected final URI location;
     protected final long id;
@@ -58,7 +60,7 @@
 
     public VMTransport(URI location) {
         this.location = location;
-        this.id = nextId.getAndIncrement();
+        this.id = NEXT_ID.getAndIncrement();
     }
 
     public VMTransport getPeer() {
@@ -77,8 +79,9 @@
         if (disposed) {
             throw new TransportDisposedIOException("Transport disposed.");
         }
-        if (peer == null)
+        if (peer == null) {
             throw new IOException("Peer not connected.");
+        }
 
         TransportListener tl = null;
         synchronized (peer.mutex) {
@@ -146,8 +149,9 @@
     }
 
     public void start() throws Exception {
-        if (transportListener == null)
+        if (transportListener == null) {
             throw new IOException("TransportListener not set.");
+        }
 
         synchronized (mutex) {
             if (messageQueue != null) {
@@ -219,8 +223,9 @@
         final TransportListener tl;
         synchronized (mutex) {
             tl = transportListener;
-            if (!started || disposed || tl == null)
+            if (!started || disposed || tl == null) {
                 return false;
+            }
         }
 
         LinkedBlockingQueue mq = getMessageQueue();
@@ -265,7 +270,7 @@
         if (async) {
             synchronized (mutex) {
                 if (taskRunner == null) {
-                    taskRunner = taskRunnerFactory.createTaskRunner(this, "VMTransport: " + toString());
+                    taskRunner = TASK_RUNNER_FACTORY.createTaskRunner(this, "VMTransport: " + toString());
                 }
             }
             try {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java Thu Aug  9 09:37:49 2007
@@ -41,10 +41,12 @@
 import org.apache.commons.logging.LogFactory;
 
 public class VMTransportFactory extends TransportFactory {
-    private static final Log log = LogFactory.getLog(VMTransportFactory.class);
-    final public static ConcurrentHashMap brokers = new ConcurrentHashMap();
-    final public static ConcurrentHashMap connectors = new ConcurrentHashMap();
-    final public static ConcurrentHashMap servers = new ConcurrentHashMap();
+    
+    public static final ConcurrentHashMap BROKERS = new ConcurrentHashMap();
+    public static final ConcurrentHashMap CONNECTORS = new ConcurrentHashMap();
+    public static final ConcurrentHashMap SERVERS = new ConcurrentHashMap();
+    private static final Log LOG = LogFactory.getLog(VMTransportFactory.class);
+    
     BrokerFactoryHandler brokerFactoryHandler;
 
     public Transport doConnect(URI location) throws Exception {
@@ -61,10 +63,12 @@
             brokerURI = data.getComponents()[0];
             CompositeData brokerData = URISupport.parseComposite(brokerURI);
             host = (String)brokerData.getParameters().get("brokerName");
-            if (host == null)
+            if (host == null) {
                 host = "localhost";
-            if (brokerData.getPath() != null)
+            }
+            if (brokerData.getPath() != null) {
                 host = data.getPath();
+            }
             options = data.getParameters();
             location = new URI("vm://" + host);
         } else {
@@ -92,7 +96,7 @@
         if (host == null) {
             host = "localhost";
         }
-        VMTransportServer server = (VMTransportServer)servers.get(host);
+        VMTransportServer server = (VMTransportServer)SERVERS.get(host);
         // validate the broker is still active
         if (!validateBroker(host) || server == null) {
             BrokerService broker = null;
@@ -116,17 +120,17 @@
                     } catch (URISyntaxException e) {
                         throw IOExceptionSupport.create(e);
                     }
-                    brokers.put(host, broker);
+                    BROKERS.put(host, broker);
                 }
 
-                server = (VMTransportServer)servers.get(host);
+                server = (VMTransportServer)SERVERS.get(host);
                 if (server == null) {
                     server = (VMTransportServer)bind(location, true);
                     TransportConnector connector = new TransportConnector(broker.getBroker(), server);
                     connector.setUri(location);
                     connector.setTaskRunnerFactory(broker.getTaskRunnerFactory());
                     connector.start();
-                    connectors.put(host, connector);
+                    CONNECTORS.put(host, connector);
                 }
 
             }
@@ -157,24 +161,24 @@
      */
     private TransportServer bind(URI location, boolean dispose) throws IOException {
         String host = location.getHost();
-        log.debug("binding to broker: " + host);
+        LOG.debug("binding to broker: " + host);
         VMTransportServer server = new VMTransportServer(location, dispose);
-        Object currentBoundValue = servers.get(host);
+        Object currentBoundValue = SERVERS.get(host);
         if (currentBoundValue != null) {
             throw new IOException("VMTransportServer already bound at: " + location);
         }
-        servers.put(host, server);
+        SERVERS.put(host, server);
         return server;
     }
 
     public static void stopped(VMTransportServer server) {
         String host = server.getBindURI().getHost();
-        servers.remove(host);
-        TransportConnector connector = (TransportConnector)connectors.remove(host);
+        SERVERS.remove(host);
+        TransportConnector connector = (TransportConnector)CONNECTORS.remove(host);
         if (connector != null) {
-            log.debug("Shutting down VM connectors for broker: " + host);
+            LOG.debug("Shutting down VM connectors for broker: " + host);
             ServiceSupport.dispose(connector);
-            BrokerService broker = (BrokerService)brokers.remove(host);
+            BrokerService broker = (BrokerService)BROKERS.remove(host);
             if (broker != null) {
                 ServiceSupport.dispose(broker);
             }
@@ -182,12 +186,12 @@
     }
 
     public static void stopped(String host) {
-        servers.remove(host);
-        TransportConnector connector = (TransportConnector)connectors.remove(host);
+        SERVERS.remove(host);
+        TransportConnector connector = (TransportConnector)CONNECTORS.remove(host);
         if (connector != null) {
-            log.debug("Shutting down VM connectors for broker: " + host);
+            LOG.debug("Shutting down VM connectors for broker: " + host);
             ServiceSupport.dispose(connector);
-            BrokerService broker = (BrokerService)brokers.remove(host);
+            BrokerService broker = (BrokerService)BROKERS.remove(host);
             if (broker != null) {
                 ServiceSupport.dispose(broker);
             }
@@ -204,17 +208,17 @@
 
     private boolean validateBroker(String host) {
         boolean result = true;
-        if (brokers.containsKey(host) || servers.containsKey(host) || connectors.containsKey(host)) {
+        if (BROKERS.containsKey(host) || SERVERS.containsKey(host) || CONNECTORS.containsKey(host)) {
             // check the broker is still in the BrokerRegistry
-            TransportConnector connector = (TransportConnector)connectors.get(host);
+            TransportConnector connector = (TransportConnector)CONNECTORS.get(host);
             if (BrokerRegistry.getInstance().lookup(host) == null
                 || (connector != null && connector.getBroker().isStopped())) {
                 result = false;
                 // clean-up
-                brokers.remove(host);
-                servers.remove(host);
+                BROKERS.remove(host);
+                SERVERS.remove(host);
                 if (connector != null) {
-                    connectors.remove(host);
+                    CONNECTORS.remove(host);
                     if (connector != null) {
                         ServiceSupport.dispose(connector);
                     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportServer.java Thu Aug  9 09:37:49 2007
@@ -63,18 +63,21 @@
     public VMTransport connect() throws IOException {
         TransportAcceptListener al;
         synchronized (this) {
-            if (disposed)
+            if (disposed) {
                 throw new IOException("Server has been disposed.");
+            }
             al = acceptListener;
         }
-        if (al == null)
+        if (al == null) {
             throw new IOException("Server TransportAcceptListener is null.");
+        }
 
         connectionCount.incrementAndGet();
         VMTransport client = new VMTransport(location) {
             public void stop() throws Exception {
-                if (disposed)
+                if (disposed) {
                     return;
+                }
                 super.stop();
                 if (connectionCount.decrementAndGet() == 0 && disposeOnDisconnect) {
                     VMTransportServer.this.stop();
@@ -106,7 +109,7 @@
      * 
      * @param acceptListener
      */
-    synchronized public void setAcceptListener(TransportAcceptListener acceptListener) {
+    public synchronized void setAcceptListener(TransportAcceptListener acceptListener) {
         this.acceptListener = acceptListener;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BitArrayBin.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.util;
 
 import java.util.LinkedList;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/BrokerSupport.java Thu Aug  9 09:37:49 2007
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
      * @param deadLetterDestination
      * @throws Exception
      */
-    static public void resend(final ConnectionContext context, Message message, ActiveMQDestination deadLetterDestination) throws Exception {
+    public static void resend(final ConnectionContext context, Message message, ActiveMQDestination deadLetterDestination) throws Exception {
         if (message.getOriginalDestination() != null) {
             message.setOriginalDestination(message.getDestination());
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteArrayInputStream.java Thu Aug  9 09:37:49 2007
@@ -45,10 +45,11 @@
     }
 
     public int read() throws IOException {
-        if (pos < limit)
+        if (pos < limit) {
             return buffer[pos++] & 0xff;
-        else
+        } else {
             return -1;
+        }
     }
 
     public int read(byte[] b) throws IOException {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ByteSequenceData.java Thu Aug  9 09:37:49 2007
@@ -21,11 +21,12 @@
 /**
  * Used to write and read primitives to and from a ByteSequence.
  */
-final public class ByteSequenceData {
+public final class ByteSequenceData {
 
     public static byte[] toByteArray(ByteSequence packet) {
-        if (packet.offset == 0 && packet.length == packet.data.length)
+        if (packet.offset == 0 && packet.length == packet.data.length) {
             return packet.data;
+        }
 
         byte rc[] = new byte[packet.length];
         System.arraycopy(packet.data, packet.offset, rc, 0, packet.length);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/Callback.java Thu Aug  9 09:37:49 2007
@@ -32,5 +32,5 @@
      * else a rollback is performed
      * @throws Exception TODO
      */
-    public void execute() throws Exception;
+    void execute() throws Exception;
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java Thu Aug  9 09:37:49 2007
@@ -56,13 +56,15 @@
 
         // Check if it is a primitive type
         type = getPrimitiveType(className);
-        if (type != null)
+        if (type != null) {
             return type;
+        }
 
         // Check if it is a vm primitive
         type = getVMPrimitiveType(className);
-        if (type != null)
+        if (type != null) {
             return type;
+        }
 
         // Handle VM class syntax (Lclassname;)
         if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';') {
@@ -105,10 +107,11 @@
     }
 
     private static Class load(final String className, final ClassLoader classLoader) throws ClassNotFoundException {
-        if (classLoader == null)
+        if (classLoader == null) {
             return Class.forName(className);
-        else
+        } else {
             return classLoader.loadClass(className);
+        }
     }
 
     public static String getClassName(Class clazz) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java Thu Aug  9 09:37:49 2007
@@ -22,9 +22,8 @@
 import java.io.ObjectStreamClass;
 import java.lang.reflect.Proxy;
 
-
 public class ClassLoadingAwareObjectInputStream extends ObjectInputStream {
-	
+
     private static final ClassLoader FALLBACK_CLASS_LOADER = ClassLoadingAwareObjectInputStream.class.getClassLoader();
 
     public ClassLoadingAwareObjectInputStream(InputStream in) throws IOException {
@@ -39,8 +38,9 @@
     protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException {
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         Class[] cinterfaces = new Class[interfaces.length];
-        for (int i = 0; i < interfaces.length; i++)
+        for (int i = 0; i < interfaces.length; i++) {
             cinterfaces[i] = load(interfaces[i], cl);
+        }
 
         try {
             return Proxy.getProxyClass(cinterfaces[0].getClassLoader(), cinterfaces);
@@ -52,7 +52,7 @@
     private Class load(String className, ClassLoader cl) throws ClassNotFoundException {
         try {
             return ClassLoading.loadClass(className, cl);
-        } catch ( ClassNotFoundException e ) {
+        } catch (ClassNotFoundException e) {
             return ClassLoading.loadClass(className, FALLBACK_CLASS_LOADER);
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayInputStream.java Thu Aug  9 09:37:49 2007
@@ -256,8 +256,9 @@
         int total = pos + length;
         while (pos < total) {
             c = (int)buf[pos] & 0xff;
-            if (c > 127)
+            if (c > 127) {
                 break;
+            }
             pos++;
             characters[count++] = (char)c;
         }
@@ -278,21 +279,25 @@
             case 12:
             case 13:
                 pos += 2;
-                if (pos > length)
+                if (pos > length) {
                     throw new UTFDataFormatException("bad string");
+                }
                 c2 = (int)buf[pos - 1];
-                if ((c2 & 0xC0) != 0x80)
+                if ((c2 & 0xC0) != 0x80) {
                     throw new UTFDataFormatException("bad string");
+                }
                 characters[count++] = (char)(((c & 0x1F) << 6) | (c2 & 0x3F));
                 break;
             case 14:
                 pos += 3;
-                if (pos > length)
+                if (pos > length) {
                     throw new UTFDataFormatException("bad string");
+                }
                 c2 = (int)buf[pos - 2];
                 c3 = (int)buf[pos - 1];
-                if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80))
+                if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80)) {
                     throw new UTFDataFormatException("bad string");
+                }
                 characters[count++] = (char)(((c & 0x0F) << 12) | ((c2 & 0x3F) << 6) | ((c3 & 0x3F) << 0));
                 break;
             default:

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/DataByteArrayOutputStream.java Thu Aug  9 09:37:49 2007
@@ -216,15 +216,17 @@
                 encodedsize += 2;
             }
         }
-        if (encodedsize > 65535)
+        if (encodedsize > 65535){
             throw new UTFDataFormatException("encoded string too long: " + encodedsize + " bytes");
+        }
         ensureEnoughBuffer(pos + encodedsize + 2);
         writeShort(encodedsize);
         int i = 0;
         for (i = 0; i < strlen; i++) {
             c = str.charAt(i);
-            if (!((c >= 0x0001) && (c <= 0x007F)))
+            if (!((c >= 0x0001) && (c <= 0x007F))) {
                 break;
+            }
             buf[pos++] = (byte)c;
         }
         for (; i < strlen; i++) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/FactoryFinder.java Thu Aug  9 09:37:49 2007
@@ -82,8 +82,9 @@
 
         // lets try the thread context class loader first
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        if (classLoader == null)
+        if (classLoader == null) {
             classLoader = getClass().getClassLoader();
+        }
         InputStream in = classLoader.getResourceAsStream(uri);
         if (in == null) {
             in = FactoryFinder.class.getClassLoader().getResourceAsStream(uri);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/HexSupport.java Thu Aug  9 09:37:49 2007
@@ -46,7 +46,7 @@
      * @param hex
      * @return
      */
-    static public byte[] toBytesFromHex(String hex) {
+    public static byte[] toBytesFromHex(String hex) {
         byte rc[] = new byte[hex.length() / 2];
         for (int i = 0; i < rc.length; i++) {
             String h = hex.substring(i * 2, i * 2 + 2);
@@ -60,7 +60,7 @@
      * @param bytes
      * @return
      */
-    static public String toHexFromBytes(byte[] bytes) {
+    public static String toHexFromBytes(byte[] bytes) {
         StringBuffer rc = new StringBuffer(bytes.length * 2);
         for (int i = 0; i < bytes.length; i++) {
             rc.append(HEX_TABLE[0xFF & bytes[i]]);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IOExceptionSupport.java Thu Aug  9 09:37:49 2007
@@ -18,7 +18,7 @@
 
 import java.io.IOException;
 
-final public class IOExceptionSupport {
+public final class IOExceptionSupport {
 
     public static IOException create(String msg, Throwable cause) {
         IOException exception = new IOException(msg);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IdGenerator.java Thu Aug  9 09:37:49 2007
@@ -27,7 +27,7 @@
 
 public class IdGenerator {
 
-    private static final Logger log = Logger.getLogger(IdGenerator.class.getName());
+    private static final Logger LOG = Logger.getLogger(IdGenerator.class.getName());
     private static final String UNIQUE_STUB;
     private static int instanceCount;
     private static String hostName;
@@ -54,7 +54,7 @@
                 Thread.sleep(100);
                 ss.close();
             } catch (Exception ioe) {
-                log.log(Level.WARNING, "could not generate unique stub", ioe);
+                LOG.log(Level.WARNING, "could not generate unique stub", ioe);
             }
         } else {
             hostName = "localhost";

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java Thu Aug  9 09:37:49 2007
@@ -35,16 +35,19 @@
 
 public class IntrospectionSupport {
 
-    static public boolean getProperties(Object target, Map props, String optionPrefix) {
+    public static boolean getProperties(Object target, Map props, String optionPrefix) {
 
         boolean rc = false;
-        if (target == null)
+        if (target == null) {
             throw new IllegalArgumentException("target was null.");
-        if (props == null)
+        }
+        if (props == null) {
             throw new IllegalArgumentException("props was null.");
+        }
 
-        if (optionPrefix == null)
+        if (optionPrefix == null) {
             optionPrefix = "";
+        }
 
         Class clazz = target.getClass();
         Method[] methods = clazz.getMethods();
@@ -58,12 +61,14 @@
                 try {
 
                     Object value = method.invoke(target, new Object[] {});
-                    if (value == null)
+                    if (value == null) {
                         continue;
+                    }
 
                     String strValue = convertToString(value, type);
-                    if (strValue == null)
+                    if (strValue == null) {
                         continue;
+                    }
 
                     name = name.substring(3, 4).toLowerCase() + name.substring(4);
                     props.put(optionPrefix + name, strValue);
@@ -78,12 +83,14 @@
         return rc;
     }
 
-    static public boolean setProperties(Object target, Map props, String optionPrefix) {
+    public static boolean setProperties(Object target, Map props, String optionPrefix) {
         boolean rc = false;
-        if (target == null)
+        if (target == null) {
             throw new IllegalArgumentException("target was null.");
-        if (props == null)
+        }
+        if (props == null) {
             throw new IllegalArgumentException("props was null.");
+        }
 
         for (Iterator iter = props.keySet().iterator(); iter.hasNext();) {
             String name = (String)iter.next();
@@ -100,8 +107,9 @@
     }
 
     public static Map extractProperties(Map props, String optionPrefix) {
-        if (props == null)
+        if (props == null) {
             throw new IllegalArgumentException("props was null.");
+        }
 
         HashMap rc = new HashMap(props.size());
 
@@ -121,10 +129,12 @@
     public static boolean setProperties(Object target, Map props) {
         boolean rc = false;
 
-        if (target == null)
+        if (target == null) {
             throw new IllegalArgumentException("target was null.");
-        if (props == null)
+        }
+        if (props == null) {
             throw new IllegalArgumentException("props was null.");
+        }
 
         for (Iterator iter = props.entrySet().iterator(); iter.hasNext();) {
             Map.Entry entry = (Entry)iter.next();
@@ -141,8 +151,9 @@
         try {
             Class clazz = target.getClass();
             Method setter = findSetterMethod(clazz, name);
-            if (setter == null)
+            if (setter == null) {
                 return false;
+            }
 
             // If the type is null or it matches the needed type, just use the
             // value directly
@@ -197,20 +208,23 @@
     }
 
     private static boolean isSettableType(Class clazz) {
-        if (PropertyEditorManager.findEditor(clazz) != null)
+        if (PropertyEditorManager.findEditor(clazz) != null) {
             return true;
-        if (clazz == URI.class)
+        }
+        if (clazz == URI.class) {
             return true;
-        if (clazz == Boolean.class)
+        }
+        if (clazz == Boolean.class) {
             return true;
+        }
         return false;
     }
 
-    static public String toString(Object target) {
+    public static String toString(Object target) {
         return toString(target, Object.class);
     }
 
-    static public String toString(Object target, Class stopClass) {
+    public static String toString(Object target, Class stopClass) {
         LinkedHashMap map = new LinkedHashMap();
         addFields(target, target.getClass(), stopClass, map);
         StringBuffer buffer = new StringBuffer(simpleName(target.getClass()));
@@ -241,7 +255,7 @@
         }
     }
 
-    static public String simpleName(Class clazz) {
+    public static String simpleName(Class clazz) {
         String name = clazz.getName();
         int p = name.lastIndexOf(".");
         if (p >= 0) {
@@ -250,10 +264,11 @@
         return name;
     }
 
-    static private void addFields(Object target, Class startClass, Class stopClass, LinkedHashMap map) {
+    private static void addFields(Object target, Class startClass, Class stopClass, LinkedHashMap map) {
 
-        if (startClass != stopClass)
+        if (startClass != stopClass) {
             addFields(target, startClass.getSuperclass(), stopClass, map);
+        }
 
         Field[] fields = startClass.getDeclaredFields();
         for (int i = 0; i < fields.length; i++) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMSExceptionSupport.java Thu Aug  9 09:37:49 2007
@@ -20,7 +20,7 @@
 import javax.jms.MessageEOFException;
 import javax.jms.MessageFormatException;
 
-final public class JMSExceptionSupport {
+public final class JMSExceptionSupport {
 
     public static JMSException create(String msg, Throwable cause) {
         JMSException exception = new JMSException(msg);
@@ -40,8 +40,9 @@
             return (JMSException)cause;
         }
         String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0)
+        if (msg == null || msg.length() == 0) {
             msg = cause.toString();
+        }
         JMSException exception = new JMSException(msg);
         exception.initCause(cause);
         return exception;
@@ -52,8 +53,9 @@
             return (JMSException)cause;
         }
         String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0)
+        if (msg == null || msg.length() == 0) {
             msg = cause.toString();
+        }
         JMSException exception = new JMSException(msg);
         exception.setLinkedException(cause);
         exception.initCause(cause);
@@ -62,8 +64,9 @@
 
     public static MessageEOFException createMessageEOFException(Exception cause) {
         String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0)
+        if (msg == null || msg.length() == 0) {
             msg = cause.toString();
+        }
         MessageEOFException exception = new MessageEOFException(msg);
         exception.setLinkedException(cause);
         exception.initCause(cause);
@@ -72,8 +75,9 @@
 
     public static MessageFormatException createMessageFormatException(Exception cause) {
         String msg = cause.getMessage();
-        if (msg == null || msg.length() == 0)
+        if (msg == null || msg.length() == 0) {
             msg = cause.toString();
+        }
         MessageFormatException exception = new MessageFormatException(msg);
         exception.setLinkedException(cause);
         exception.initCause(cause);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/JMXSupport.java Thu Aug  9 09:37:49 2007
@@ -17,7 +17,7 @@
 package org.apache.activemq.util;
 
 public class JMXSupport {
-    static public String encodeObjectNamePart(String part) {
+    public static String encodeObjectNamePart(String part) {
         //return ObjectName.quote(part);
         String answer = part.replaceAll("[\\:\\,\\'\\\"]", "_");
         answer = answer.replaceAll("\\?", "&qe;");

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/LongSequenceGenerator.java Thu Aug  9 09:37:49 2007
@@ -20,15 +20,15 @@
 
     private long lastSequenceId;
 
-    synchronized public long getNextSequenceId() {
+    public synchronized long getNextSequenceId() {
         return ++lastSequenceId;
     }
 
-    synchronized public long getLastSequenceId() {
+    public synchronized long getLastSequenceId() {
         return lastSequenceId;
     }
 
-    synchronized public void setLastSequenceId(long l) {
+    public synchronized void setLastSequenceId(long l) {
         lastSequenceId = l;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/MarshallingSupport.java Thu Aug  9 09:37:49 2007
@@ -52,7 +52,7 @@
     public static final byte LIST_TYPE = 12;
     public static final byte BIG_STRING_TYPE = 13;
 
-    static public void marshalPrimitiveMap(Map map, DataOutputStream out) throws IOException {
+    public static void marshalPrimitiveMap(Map map, DataOutputStream out) throws IOException {
         if (map == null) {
             out.writeInt(-1);
         } else {
@@ -66,7 +66,7 @@
         }
     }
 
-    static public Map unmarshalPrimitiveMap(DataInputStream in) throws IOException {
+    public static Map unmarshalPrimitiveMap(DataInputStream in) throws IOException {
         return unmarshalPrimitiveMap(in, Integer.MAX_VALUE);
     }
 
@@ -76,9 +76,9 @@
      * @throws IOException
      * @throws IOException
      */
-    public static Map unmarshalPrimitiveMap(DataInputStream in, int max_property_size) throws IOException {
+    public static Map unmarshalPrimitiveMap(DataInputStream in, int maxPropertySize) throws IOException {
         int size = in.readInt();
-        if (size > max_property_size) {
+        if (size > maxPropertySize) {
             throw new IOException("Primitive map is larger than the allowed size: " + size);
         }
         if (size < 0) {
@@ -111,7 +111,7 @@
         return answer;
     }
 
-    static public void marshalPrimitive(DataOutputStream out, Object value) throws IOException {
+    public static void marshalPrimitive(DataOutputStream out, Object value) throws IOException {
         if (value == null) {
             marshalNull(out);
         } else if (value.getClass() == Boolean.class) {
@@ -145,7 +145,7 @@
         }
     }
 
-    static public Object unmarshalPrimitive(DataInputStream in) throws IOException {
+    public static Object unmarshalPrimitive(DataInputStream in) throws IOException {
         Object value = null;
         byte type = in.readByte();
         switch (type) {
@@ -260,7 +260,7 @@
         }
     }
 
-    static public void writeUTF8(DataOutput dataOut, String text) throws IOException {
+    public static void writeUTF8(DataOutput dataOut, String text) throws IOException {
         if (text != null) {
             int strlen = text.length();
             int utflen = 0;
@@ -307,7 +307,7 @@
         }
     }
 
-    static public String readUTF8(DataInput dataIn) throws IOException {
+    public static String readUTF8(DataInput dataIn) throws IOException {
         int utflen = dataIn.readInt(); // TODO diff: Sun code
         if (utflen > -1) {
             StringBuffer str = new StringBuffer(utflen);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java Thu Aug  9 09:37:49 2007
@@ -29,7 +29,7 @@
  * @version $Revision: 1.1 $
  */
 public abstract class ServiceSupport implements Service {
-    private static final Log log = LogFactory.getLog(ServiceSupport.class);
+    private static final Log LOG = LogFactory.getLog(ServiceSupport.class);
 
     private AtomicBoolean started = new AtomicBoolean(false);
     private AtomicBoolean stopping = new AtomicBoolean(false);
@@ -39,7 +39,7 @@
         try {
             service.stop();
         } catch (Exception e) {
-            log.debug("Could not stop service: " + service + ". Reason: " + e, e);
+            LOG.debug("Could not stop service: " + service + ". Reason: " + e, e);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java Thu Aug  9 09:37:49 2007
@@ -28,7 +28,7 @@
  * @version $Revision: 1.2 $
  */
 public class TransactionTemplate {
-    static private final Log LOG = LogFactory.getLog(TransactionTemplate.class);
+    private static final Log LOG = LogFactory.getLog(TransactionTemplate.class);
     private PersistenceAdapter persistenceAdapter;
     private ConnectionContext context;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TypeConversionSupport.java Thu Aug  9 09:37:49 2007
@@ -48,7 +48,7 @@
         Object convert(Object value);
     }
 
-    static final private HashMap CONVERSION_MAP = new HashMap();
+    private static final HashMap CONVERSION_MAP = new HashMap();
     static {
         Converter toStringConverter = new Converter() {
             public Object convert(Object value) {
@@ -139,16 +139,18 @@
         });
     }
 
-    static public Object convert(Object value, Class clazz) {
+    public static Object convert(Object value, Class clazz) {
 
         assert value != null && clazz != null;
 
-        if (value.getClass() == clazz)
+        if (value.getClass() == clazz) {
             return value;
+        }
 
         Converter c = (Converter) CONVERSION_MAP.get(new ConversionKey(value.getClass(), clazz));
-        if (c == null)
+        if (c == null) {
             return null;
+        }
         return c.convert(value);
 
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java Thu Aug  9 09:37:49 2007
@@ -76,8 +76,9 @@
             } else {
                 sb.append('(');
                 for (int i = 0; i < components.length; i++) {
-                    if (i != 0)
+                    if (i != 0) {
                         sb.append(',');
+                    }
                     sb.append(components[i].toString());
                 }
                 sb.append(')');
@@ -197,8 +198,9 @@
             }
             rc.parameters = parseQuery(params.substring(p + 1));
         } else {
-            if (params.length() > 0)
+            if (params.length() > 0) {
                 rc.path = stripPrefix(params, "/");
+            }
             rc.parameters = Collections.EMPTY_MAP;
         }
     }
@@ -233,8 +235,9 @@
         }
 
         String s = str.substring(last);
-        if (s.length() != 0)
+        if (s.length() != 0) {
             l.add(s);
+        }
 
         String rc[] = new String[l.size()];
         l.toArray(rc);
@@ -242,8 +245,9 @@
     }
 
     public static String stripPrefix(String value, String prefix) {
-        if (value.startsWith(prefix))
+        if (value.startsWith(prefix)) {
             return value.substring(prefix.length());
+        }
         return value;
     }
 
@@ -257,11 +261,11 @@
                 StringBuffer rc = new StringBuffer();
                 boolean first = true;
                 for (Iterator iter = options.keySet().iterator(); iter.hasNext();) {
-                    if (first)
+                    if (first) {
                         first = false;
-                    else
+                    } else {
                         rc.append("&");
-
+                    }
                     String key = (String)iter.next();
                     String value = (String)options.get(key);
                     rc.append(URLEncoder.encode(key, "UTF-8"));
@@ -284,12 +288,13 @@
      */
     public static URI createRemainingURI(URI originalURI, Map params) throws URISyntaxException {
         String s = createQueryString(params);
-        if (s.length() == 0)
+        if (s.length() == 0) {
             s = null;
+        }
         return createURIWithQuery(originalURI, s);
     }
 
-    static public URI changeScheme(URI bindAddr, String scheme) throws URISyntaxException {
+    public static URI changeScheme(URI bindAddr, String scheme) throws URISyntaxException {
         return new URI(scheme, bindAddr.getUserInfo(), bindAddr.getHost(), bindAddr.getPort(), bindAddr.getPath(), bindAddr.getQuery(), bindAddr.getFragment());
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/wireformat/WireFormat.java Thu Aug  9 09:37:49 2007
@@ -54,11 +54,11 @@
     /**
      * @param the version of the wire format
      */
-    public void setVersion(int version);
+    void setVersion(int version);
     
     /**
      * @return the version of the wire format
      */
-    public int getVersion();
+    int getVersion();
     
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/PooledBrokerFactoryBean.java Thu Aug  9 09:37:49 2007
@@ -34,7 +34,7 @@
  */
 public class PooledBrokerFactoryBean implements FactoryBean, InitializingBean, DisposableBean {
 
-    static final HashMap sharedBrokerMap = new HashMap();
+    static final HashMap SHARED_BROKER_MAP = new HashMap();
 
     private boolean start;
     private Resource config;
@@ -45,28 +45,28 @@
     }
 
     public void afterPropertiesSet() throws Exception {
-        synchronized (sharedBrokerMap) {
-            SharedBroker sharedBroker = (SharedBroker)sharedBrokerMap.get(config.getFilename());
+        synchronized (SHARED_BROKER_MAP) {
+            SharedBroker sharedBroker = (SharedBroker)SHARED_BROKER_MAP.get(config.getFilename());
             if (sharedBroker == null) {
                 sharedBroker = new SharedBroker();
                 sharedBroker.factory = new BrokerFactoryBean();
                 sharedBroker.factory.setConfig(config);
                 sharedBroker.factory.setStart(start);
                 sharedBroker.factory.afterPropertiesSet();
-                sharedBrokerMap.put(config.getFilename(), sharedBroker);
+                SHARED_BROKER_MAP.put(config.getFilename(), sharedBroker);
             }
             sharedBroker.refCount++;
         }
     }
 
     public void destroy() throws Exception {
-        synchronized (sharedBrokerMap) {
-            SharedBroker sharedBroker = (SharedBroker)sharedBrokerMap.get(config.getFilename());
+        synchronized (SHARED_BROKER_MAP) {
+            SharedBroker sharedBroker = (SharedBroker)SHARED_BROKER_MAP.get(config.getFilename());
             if (sharedBroker != null) {
                 sharedBroker.refCount--;
                 if (sharedBroker.refCount == 0) {
                     sharedBroker.factory.destroy();
-                    sharedBrokerMap.remove(config.getFilename());
+                    SHARED_BROKER_MAP.remove(config.getFilename());
                 }
             }
         }
@@ -77,8 +77,8 @@
     }
 
     public Object getObject() throws Exception {
-        synchronized (sharedBrokerMap) {
-            SharedBroker sharedBroker = (SharedBroker)sharedBrokerMap.get(config.getFilename());
+        synchronized (SHARED_BROKER_MAP) {
+            SharedBroker sharedBroker = (SharedBroker)SHARED_BROKER_MAP.get(config.getFilename());
             if (sharedBroker != null) {
                 return sharedBroker.factory.getObject();
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerFactory.java Thu Aug  9 09:37:49 2007
@@ -39,7 +39,7 @@
  * @version $Revision$
  */
 public class XBeanBrokerFactory implements BrokerFactoryHandler {
-    private static final transient Log log = LogFactory.getLog(XBeanBrokerFactory.class);
+    private static final transient Log LOG = LogFactory.getLog(XBeanBrokerFactory.class);
 
     static {
         PropertyEditorManager.registerEditor(URI.class, URIEditor.class);
@@ -77,7 +77,7 @@
     }
 
     protected ApplicationContext createApplicationContext(String uri) throws MalformedURLException {
-        log.debug("Now attempting to figure out the type of resource: " + uri);
+        LOG.debug("Now attempting to figure out the type of resource: " + uri);
 
         Resource resource;
         File file = new File(uri);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java Thu Aug  9 09:37:49 2007
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.activemq;
 
 import java.net.URI;
@@ -35,7 +51,7 @@
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
 
 public class AMQDeadlockTest3 extends TestCase {
-    private static final transient Log log = LogFactory.getLog(AMQDeadlockTest3.class);
+    private static final transient Log LOG = LogFactory.getLog(AMQDeadlockTest3.class);
 
     private static final String URL1 = "tcp://localhost:61616";
 
@@ -289,7 +305,7 @@
         public void onMessage(Message msg) {
 
             try {
-                log.info("Listener1 Consumed message " + msg.getIntProperty("count"));
+                LOG.info("Listener1 Consumed message " + msg.getIntProperty("count"));
 
                 messageCount.incrementAndGet();
                 doneLatch.countDown();
@@ -349,12 +365,12 @@
                         }
                     });
 
-                    log.info("PooledProducer sent message: " + count.get());
+                    LOG.info("PooledProducer sent message: " + count.get());
                     // Thread.sleep(1000);
                 }
 
             } catch (final Throwable e) {
-                log.error("Producer 1 is exiting", e);
+                LOG.error("Producer 1 is exiting", e);
             }
         }
     }
@@ -402,13 +418,13 @@
                         }
                     });
 
-                    log.info("Non-PooledProducer sent message: " + count.get());
+                    LOG.info("Non-PooledProducer sent message: " + count.get());
 
                     // Thread.sleep(1000);
                 }
 
             } catch (final Throwable e) {
-                log.error("Producer 1 is exiting", e);
+                LOG.error("Producer 1 is exiting", e);
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQConnectionFactoryTest.java Thu Aug  9 09:37:49 2007
@@ -29,8 +29,12 @@
 import org.apache.activemq.broker.BrokerRegistry;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
+import org.apache.activemq.network.DiscoveryNetworkConnector;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
+    private static final Log LOG = LogFactory.getLog(ActiveMQConnectionFactoryTest.class);
 
     private ActiveMQConnection connection;
     private BrokerService broker;
@@ -44,7 +48,7 @@
         connection.start();
 
         String clientID = connection.getClientID();
-        log.info("Got client ID: " + clientID);
+        LOG.info("Got client ID: " + clientID);
 
         assertTrue("should start with Cheese! but was: " + clientID, clientID.startsWith("Cheese"));
     }
@@ -117,7 +121,7 @@
         connection.start();
 
         String brokerName = connection.getBrokerName();
-        log.info("Got broker name: " + brokerName);
+        LOG.info("Got broker name: " + brokerName);
 
         assertNotNull("No broker name available!", brokerName);
     }
@@ -172,7 +176,7 @@
         URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(),
                                  temp.getPath(), temp.getQuery(), temp.getFragment());
 
-        log.info("connection URI is: " + connectURI);
+        LOG.info("connection URI is: " + connectURI);
 
         // This should create the connection.
         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(connectURI);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.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;
 
 import java.util.ArrayList;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java Thu Aug  9 09:37:49 2007
@@ -28,8 +28,12 @@
 import org.apache.activemq.broker.BrokerRegistry;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
+import org.apache.activemq.transport.stomp.StompTransportFilter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport {
+    private static final Log LOG = LogFactory.getLog(ActiveMQXAConnectionFactoryTest.class);
 
     public void testCopy() throws URISyntaxException, JMSException {
         ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://localhost?");
@@ -78,7 +82,7 @@
         connection.start();
 
         String brokerName = connection.getBrokerName();
-        log.info("Got broker name: " + brokerName);
+        LOG.info("Got broker name: " + brokerName);
 
         assertNotNull("No broker name available!", brokerName);
         connection.close();
@@ -110,7 +114,7 @@
         URI connectURI = new URI(temp.getScheme(), temp.getUserInfo(), temp.getHost(), currentURI.getPort(),
                                  temp.getPath(), temp.getQuery(), temp.getFragment());
 
-        log.info("connection URI is: " + connectURI);
+        LOG.info("connection URI is: " + connectURI);
 
         // This should create the connection.
         ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(connectURI);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java Thu Aug  9 09:37:49 2007
@@ -30,7 +30,7 @@
  */
 
 public abstract class AutoFailTestSupport extends TestCase {
-    protected static final Log LOG = LogFactory.getLog(AutoFailTestSupport.class);
+    private static final Log LOG = LogFactory.getLog(AutoFailTestSupport.class);
 
     public static final int EXIT_SUCCESS = 0;
     public static final int EXIT_ERROR = 1;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java Thu Aug  9 09:37:49 2007
@@ -132,12 +132,13 @@
         return ack;
     }
 
-    protected Message receiveMessage(StubConnection connection, int MAX_WAIT) throws InterruptedException {
+    protected Message receiveMessage(StubConnection connection, int maxWait) throws InterruptedException {
         while (true) {
-            Object o = connection.getDispatchQueue().poll(MAX_WAIT, TimeUnit.MILLISECONDS);
+            Object o = connection.getDispatchQueue().poll(maxWait, TimeUnit.MILLISECONDS);
 
-            if (o == null)
+            if (o == null) {
                 return null;
+            }
 
             if (o instanceof MessageDispatch) {
                 MessageDispatch dispatch = (MessageDispatch)o;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/CombinationTestSupport.java Thu Aug  9 09:37:49 2007
@@ -60,7 +60,7 @@
  */
 public abstract class CombinationTestSupport extends AutoFailTestSupport {
 
-    protected static final Log log = LogFactory.getLog(CombinationTestSupport.class);
+    private static final Log LOG = LogFactory.getLog(CombinationTestSupport.class);
 
     private HashMap comboOptions = new HashMap();
     private boolean combosEvaluated;
@@ -108,7 +108,7 @@
                 Field field = getClass().getField(attribute);
                 field.set(this, value);
             } catch (Throwable e) {
-                log.info("Could not set field '" + attribute + "' to value '" + value + "', make sure the field exists and is public.");
+                LOG.info("Could not set field '" + attribute + "' to value '" + value + "', make sure the field exists and is public.");
             }
         }
     }
@@ -190,8 +190,9 @@
         Method[] methods = clazz.getMethods();
         for (int i = 0; i < methods.length; i++) {
             String name = methods[i].getName();
-            if (names.contains(name) || !isPublicTestMethod(methods[i]))
+            if (names.contains(name) || !isPublicTestMethod(methods[i])) {
                 continue;
+            }
             names.add(name);
             Test test = TestSuite.createTest(clazz, name);
             if (test instanceof CombinationTestSupport) {
@@ -206,11 +207,11 @@
         return suite;
     }
 
-    static private boolean isPublicTestMethod(Method m) {
+    private static boolean isPublicTestMethod(Method m) {
         return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
     }
 
-    static private boolean isTestMethod(Method m) {
+    private static boolean isTestMethod(Method m) {
         String name = m.getName();
         Class[] parameters = m.getParameterTypes();
         Class returnType = m.getReturnType();



Mime
View raw message