activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564057 [2/13] - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/advisory/ main/java/org/apache/activemq/blob/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/broker/ft/...
Date Thu, 09 Aug 2007 00:34:40 GMT
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducerSupport.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,12 @@
  */
 package org.apache.activemq;
 
-import javax.jms.*;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
 import javax.jms.IllegalStateException;
+import javax.jms.JMSException;
 import javax.jms.Message;
+import javax.jms.MessageProducer;
 
 /**
  * A useful base class for implementing a {@link MessageProducer}
@@ -194,7 +197,7 @@
      * @see javax.jms.Message#DEFAULT_TIME_TO_LIVE
      */
     public void setTimeToLive(long timeToLive) throws JMSException {
-        if (timeToLive < 0l) {
+        if (timeToLive < 0L) {
             throw new IllegalStateException("cannot set a negative timeToLive");
         }
         checkClosed();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java Wed Aug  8 17:34:07 2007
@@ -20,10 +20,10 @@
 
 import javax.jms.BytesMessage;
 import javax.jms.Destination;
-import javax.jms.MessageEOFException;
 import javax.jms.JMSException;
 import javax.jms.MapMessage;
 import javax.jms.Message;
+import javax.jms.MessageEOFException;
 import javax.jms.ObjectMessage;
 import javax.jms.Queue;
 import javax.jms.StreamMessage;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQOutputStream.java Wed Aug  8 17:34:07 2007
@@ -72,7 +72,7 @@
     }
 
     public void close() throws IOException {
-        if (closed == false) {
+        if (!closed) {
             flushBuffer();
             try {
                 // Send an EOS style empty message to signal EOS.
@@ -86,7 +86,7 @@
     }
 
     public void dispose() {
-        if (closed == false) {
+        if (!closed) {
             this.connection.removeOutputStream(this);
             closed = true;
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java Wed Aug  8 17:34:07 2007
@@ -17,6 +17,7 @@
 package org.apache.activemq;
 
 import java.util.Enumeration;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import javax.jms.IllegalStateException;
 import javax.jms.JMSException;
@@ -27,8 +28,6 @@
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerId;
 import org.apache.activemq.command.MessageDispatch;
-
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A client uses a <CODE>QueueBrowser</CODE> object to look at messages on a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Wed Aug  8 17:34:07 2007
@@ -29,8 +29,6 @@
 import javax.jms.BytesMessage;
 import javax.jms.Destination;
 import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.InvalidSelectorException;
 import javax.jms.JMSException;
 import javax.jms.MapMessage;
 import javax.jms.Message;
@@ -52,11 +50,32 @@
 import javax.jms.TopicPublisher;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
-import javax.jms.TransactionRolledBackException;
 
 import org.apache.activemq.blob.BlobTransferPolicy;
 import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQBlobMessage;
+import org.apache.activemq.command.ActiveMQBytesMessage;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQMapMessage;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQStreamMessage;
+import org.apache.activemq.command.ActiveMQTempDestination;
+import org.apache.activemq.command.ActiveMQTempQueue;
+import org.apache.activemq.command.ActiveMQTempTopic;
+import org.apache.activemq.command.ActiveMQTextMessage;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.command.Command;
+import org.apache.activemq.command.ConsumerId;
+import org.apache.activemq.command.MessageAck;
+import org.apache.activemq.command.MessageDispatch;
+import org.apache.activemq.command.MessageId;
+import org.apache.activemq.command.ProducerId;
+import org.apache.activemq.command.Response;
+import org.apache.activemq.command.SessionId;
+import org.apache.activemq.command.SessionInfo;
+import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.management.JMSSessionStatsImpl;
 import org.apache.activemq.management.StatsCapable;
 import org.apache.activemq.management.StatsImpl;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicPublisher.java Wed Aug  8 17:34:07 2007
@@ -17,17 +17,12 @@
 
 package org.apache.activemq;
 
-import org.apache.activemq.command.ActiveMQDestination;
-
-import javax.jms.Destination;
-import javax.jms.InvalidDestinationException;
 import javax.jms.JMSException;
 import javax.jms.Message;
-import javax.jms.MessageFormatException;
-import javax.jms.Session;
 import javax.jms.Topic;
 import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
+
+import org.apache.activemq.command.ActiveMQDestination;
 
 /**
  * A client uses a <CODE>TopicPublisher</CODE> object to publish messages on

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java Wed Aug  8 17:34:07 2007
@@ -17,12 +17,12 @@
 
 package org.apache.activemq;
 
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ConsumerId;
-
 import javax.jms.JMSException;
 import javax.jms.Topic;
 import javax.jms.TopicSubscriber;
+
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ConsumerId;
 
 /**
  * A client uses a <CODE>TopicSubscriber</CODE> object to receive messages

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQXAConnectionFactory.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,7 @@
  */
 package org.apache.activemq;
 
-import org.apache.activemq.management.JMSStatsImpl;
-import org.apache.activemq.transport.Transport;
+import java.net.URI;
 
 import javax.jms.JMSException;
 import javax.jms.XAConnection;
@@ -27,7 +26,8 @@
 import javax.jms.XATopicConnection;
 import javax.jms.XATopicConnectionFactory;
 
-import java.net.URI;
+import org.apache.activemq.management.JMSStatsImpl;
+import org.apache.activemq.transport.Transport;
 
 /**
  * A factory of {@link XAConnection} instances

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,12 @@
  */
 package org.apache.activemq;
 
-import javax.jms.JMSException;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.jms.JMSException;
 
 /**
  * Represents a message which has a typically out of band Binary Large Object

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/CustomDestination.java Wed Aug  8 17:34:07 2007
@@ -17,13 +17,13 @@
 package org.apache.activemq;
 
 import javax.jms.Destination;
+import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
-import javax.jms.TopicSubscriber;
 import javax.jms.QueueReceiver;
-import javax.jms.TopicPublisher;
 import javax.jms.QueueSender;
-import javax.jms.JMSException;
+import javax.jms.TopicPublisher;
+import javax.jms.TopicSubscriber;
 
 /**
  * Represents a hook to allow the support of custom destinations

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/MessageTransformer.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,11 @@
  */
 package org.apache.activemq;
 
-import org.apache.activemq.command.ActiveMQMessage;
-
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.MessageProducer;
 import javax.jms.JMSException;
+import javax.jms.Message;
 import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
 
 /**
  * A plugin strategy for transforming a message before it is sent by the JMS client or before it is

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java Wed Aug  8 17:34:07 2007
@@ -19,6 +19,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.jms.JMSException;
 import javax.jms.TransactionInProgressException;
@@ -29,19 +30,17 @@
 
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.DataArrayResponse;
+import org.apache.activemq.command.DataStructure;
 import org.apache.activemq.command.IntegerResponse;
 import org.apache.activemq.command.LocalTransactionId;
 import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.command.TransactionInfo;
 import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.command.DataStructure;
 import org.apache.activemq.transaction.Synchronization;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.activemq.util.LongSequenceGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * A TransactionContext provides the means to control a JMS transaction. It

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.advisory;
 
-import java.io.IOException;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerFilter;
@@ -41,8 +41,6 @@
 import org.apache.activemq.util.LongSequenceGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * This broker filter handles tracking the state of the broker for purposes of

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.advisory;
 
+import javax.jms.Destination;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQTopic;
 
-import javax.jms.Destination;
-
 public class AdvisorySupport {
 
     public static final String ADVISORY_TOPIC_PREFIX = "ActiveMQ.Advisory.";
@@ -102,8 +102,9 @@
             return TEMP_QUEUE_ADVISORY_TOPIC;
         case ActiveMQDestination.TEMP_TOPIC_TYPE:
             return TEMP_TOPIC_ADVISORY_TOPIC;
+        default:
+            throw new RuntimeException("Unknown destination type: " + destination.getDestinationType());
         }
-        throw new RuntimeException("Unknown destination type: " + destination.getDestinationType());
     }
 
     public static boolean isDestinationAdvisoryTopic(ActiveMQDestination destination) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEvent.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.advisory;
 
-import org.apache.activemq.command.ConsumerId;
+import java.util.EventObject;
 
 import javax.jms.Destination;
 
-import java.util.EventObject;
+import org.apache.activemq.command.ConsumerId;
 
 /**
  * An event when the number of consumers on a given destination changes.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ConsumerEventSource.java Wed Aug  8 17:34:07 2007
@@ -19,6 +19,14 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Session;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQMessage;
@@ -29,14 +37,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-
 /**
  * An object which can be used to listen to the number of active consumers
  * available on a given destination.
@@ -82,27 +82,24 @@
 
     public void onMessage(Message message) {
         if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage) message;
+            ActiveMQMessage activeMessage = (ActiveMQMessage)message;
             Object command = activeMessage.getDataStructure();
             int count = 0;
             if (command instanceof ConsumerInfo) {
                 count = consumerCount.incrementAndGet();
                 count = extractConsumerCountFromMessage(message, count);
-                fireConsumerEvent(new ConsumerStartedEvent(this, destination, (ConsumerInfo) command, count));
-            }
-            else if (command instanceof RemoveInfo) {
-                RemoveInfo removeInfo = (RemoveInfo) command;
+                fireConsumerEvent(new ConsumerStartedEvent(this, destination, (ConsumerInfo)command, count));
+            } else if (command instanceof RemoveInfo) {
+                RemoveInfo removeInfo = (RemoveInfo)command;
                 if (removeInfo.isConsumerRemove()) {
                     count = consumerCount.decrementAndGet();
                     count = extractConsumerCountFromMessage(message, count);
-                    fireConsumerEvent(new ConsumerStoppedEvent(this, destination, (ConsumerId) removeInfo.getObjectId(), count));
+                    fireConsumerEvent(new ConsumerStoppedEvent(this, destination, (ConsumerId)removeInfo.getObjectId(), count));
                 }
-            }
-            else {
+            } else {
                 log.warn("Unknown command: " + command);
             }
-        }
-        else {
+        } else {
             log.warn("Unknown message type: " + message + ". Message ignored");
         }
     }
@@ -116,12 +113,11 @@
         try {
             Object value = message.getObjectProperty("consumerCount");
             if (value instanceof Number) {
-                Number n = (Number) value;
+                Number n = (Number)value;
                 return n.intValue();
             }
             log.warn("No consumerCount header available on the message: " + message);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             log.warn("Failed to extract consumerCount from message: " + message + ".Reason: " + e, e);
         }
         return count;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEvent.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.advisory;
 
-import org.apache.activemq.command.ProducerId;
+import java.util.EventObject;
 
 import javax.jms.Destination;
 
-import java.util.EventObject;
+import org.apache.activemq.command.ProducerId;
 
 /**
  * An event when the number of producers on a given destination changes.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/ProducerEventSource.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.advisory;
 
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -23,6 +26,7 @@
 import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.Session;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQMessage;
@@ -32,8 +36,6 @@
 import org.apache.activemq.command.RemoveInfo;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * An object which can be used to listen to the number of active consumers
@@ -80,27 +82,24 @@
 
     public void onMessage(Message message) {
         if (message instanceof ActiveMQMessage) {
-            ActiveMQMessage activeMessage = (ActiveMQMessage) message;
+            ActiveMQMessage activeMessage = (ActiveMQMessage)message;
             Object command = activeMessage.getDataStructure();
             int count = 0;
             if (command instanceof ProducerInfo) {
                 count = producerCount.incrementAndGet();
                 count = extractProducerCountFromMessage(message, count);
-                fireProducerEvent(new ProducerStartedEvent(this, destination, (ProducerInfo) command, count));
-            }
-            else if (command instanceof RemoveInfo) {
-                RemoveInfo removeInfo = (RemoveInfo) command;
+                fireProducerEvent(new ProducerStartedEvent(this, destination, (ProducerInfo)command, count));
+            } else if (command instanceof RemoveInfo) {
+                RemoveInfo removeInfo = (RemoveInfo)command;
                 if (removeInfo.isProducerRemove()) {
                     count = producerCount.decrementAndGet();
                     count = extractProducerCountFromMessage(message, count);
-                    fireProducerEvent(new ProducerStoppedEvent(this, destination, (ProducerId) removeInfo.getObjectId(), count));
+                    fireProducerEvent(new ProducerStoppedEvent(this, destination, (ProducerId)removeInfo.getObjectId(), count));
                 }
-            }
-            else {
+            } else {
                 log.warn("Unknown command: " + command);
             }
-        }
-        else {
+        } else {
             log.warn("Unknown message type: " + message + ". Message ignored");
         }
     }
@@ -109,12 +108,11 @@
         try {
             Object value = message.getObjectProperty("producerCount");
             if (value instanceof Number) {
-                Number n = (Number) value;
+                Number n = (Number)value;
                 return n.intValue();
             }
             log.warn("No producerCount header available on the message: " + message);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             log.warn("Failed to extract producerCount from message: " + message + ".Reason: " + e, e);
         }
         return count;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,14 @@
  */
 package org.apache.activemq.blob;
 
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-import javax.jms.JMSException;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+
+import javax.jms.JMSException;
+
+import org.apache.activemq.command.ActiveMQBlobMessage;
 
 /**
  * Represents a strategy of uploading a file/stream to some remote

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java Wed Aug  8 17:34:07 2007
@@ -16,17 +16,18 @@
  */
 package org.apache.activemq.blob;
 
-import org.apache.activemq.command.ActiveMQBlobMessage;
-
-import javax.jms.JMSException;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
+import javax.jms.JMSException;
+
+import org.apache.activemq.command.ActiveMQBlobMessage;
+
 /**
  * A helper class to represent a required upload of a BLOB to some remote URL
- *
+ * 
  * @version $Revision: $
  */
 public class BlobUploader {
@@ -35,7 +36,6 @@
     private File file;
     private InputStream in;
 
-
     public BlobUploader(BlobTransferPolicy blobTransferPolicy, InputStream in) {
         this.blobTransferPolicy = blobTransferPolicy;
         this.in = in;
@@ -49,12 +49,10 @@
     public URL upload(ActiveMQBlobMessage message) throws JMSException, IOException {
         if (file != null) {
             return getStrategy().uploadFile(message, file);
-        }
-        else {
+        } else {
             return getStrategy().uploadStream(message, in);
         }
     }
-
 
     public BlobTransferPolicy getBlobTransferPolicy() {
         return blobTransferPolicy;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java Wed Aug  8 17:34:07 2007
@@ -30,9 +30,11 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
+
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+
 import org.apache.activemq.ActiveMQConnectionMetaData;
 import org.apache.activemq.Service;
 import org.apache.activemq.advisory.AdvisoryBroker;
@@ -77,10 +79,10 @@
 import org.apache.activemq.transport.TransportServer;
 import org.apache.activemq.transport.vm.VMTransportFactory;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.util.JMXSupport;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.activemq.util.URISupport;
-import org.apache.activemq.util.IOHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ConnectionContext.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.broker;
 
+import java.io.IOException;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.command.ConnectionId;
@@ -28,8 +28,6 @@
 import org.apache.activemq.security.MessageAuthorizationPolicy;
 import org.apache.activemq.security.SecurityContext;
 import org.apache.activemq.transaction.Transaction;
-
-import java.io.IOException;
 
 /**
  * Used to hold context information needed to process requests sent to a broker.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/DestinationAlreadyExistsException.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.broker;
 
-import org.apache.activemq.command.ActiveMQDestination;
-
 import javax.jms.JMSException;
+
+import org.apache.activemq.command.ActiveMQDestination;
 
 /**
  * An exception thrown if a destination is attempted to be created when it already exists.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java Wed Aug  8 17:34:07 2007
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.broker;
 
-import org.apache.activemq.util.IntrospectionSupport;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
-import java.net.MalformedURLException;
 import java.util.Map;
 import java.util.Properties;
+
+import org.apache.activemq.util.IntrospectionSupport;
 
 /**
  * A {@link BrokerFactoryHandler} which uses a properties file to configure the

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/SslBrokerService.java Wed Aug  8 17:34:07 2007
@@ -17,10 +17,6 @@
 
 package org.apache.activemq.broker;
 
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.transport.tcp.SslTransportFactory;
-
 import java.io.IOException;
 import java.net.URI;
 import java.security.KeyManagementException;
@@ -28,6 +24,10 @@
 
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.TrustManager;
+
+import org.apache.activemq.transport.TransportFactory;
+import org.apache.activemq.transport.TransportServer;
+import org.apache.activemq.transport.tcp.SslTransportFactory;
 
 /**
  * A BrokerService that allows access to the key and trust managers used by SSL

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransactionBroker.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,15 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import javax.jms.JMSException;
+import javax.transaction.xa.XAException;
+
 import org.apache.activemq.ActiveMQMessageAudit;
 import org.apache.activemq.command.ConnectionInfo;
 import org.apache.activemq.command.LocalTransactionId;
@@ -35,15 +42,6 @@
 import org.apache.activemq.util.WrappedException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.jms.JMSException;
-
-import javax.transaction.xa.XAException;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
 
 /**
  * This broker filter handles the transaction related operations in the Broker

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Wed Aug  8 17:34:07 2007
@@ -30,6 +30,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.broker.ft.MasterBroker;
 import org.apache.activemq.broker.region.ConnectionStatistics;
@@ -97,8 +98,7 @@
 public class TransportConnection implements Service, Connection, Task, CommandVisitor {
 
     private static final Log LOG = LogFactory.getLog(TransportConnection.class);
-    private static final Log TRANSPORTLOG = LogFactory.getLog(TransportConnection.class.getName()
-                                                              + ".Transport");
+    private static final Log TRANSPORTLOG = LogFactory.getLog(TransportConnection.class.getName() + ".Transport");
     private static final Log SERVICELOG = LogFactory.getLog(TransportConnection.class.getName() + ".Service");
     // Keeps track of the broker and connector that created this connection.
     protected final Broker broker;
@@ -191,8 +191,7 @@
      * @param taskRunnerFactory - can be null if you want direct dispatch to the
      *                transport else commands are sent async.
      */
-    public TransportConnection(TransportConnector connector, final Transport transport, Broker broker,
-                               TaskRunnerFactory taskRunnerFactory) {
+    public TransportConnection(TransportConnector connector, final Transport transport, Broker broker, TaskRunnerFactory taskRunnerFactory) {
         this.connector = connector;
         this.broker = broker;
         RegionBroker rb = (RegionBroker)broker.getAdaptor(RegionBroker.class);
@@ -272,8 +271,7 @@
         else if (e.getClass() == BrokerStoppedException.class) {
             if (!disposed.get()) {
                 if (SERVICELOG.isDebugEnabled())
-                    SERVICELOG
-                        .debug("Broker has been stopped.  Notifying client and closing his connection.");
+                    SERVICELOG.debug("Broker has been stopped.  Notifying client and closing his connection.");
                 ConnectionError ce = new ConnectionError();
                 ce.setException(e);
                 dispatchSync(ce);
@@ -403,8 +401,7 @@
         }
         TransactionState transactionState = cs.getTransactionState(info.getTransactionId());
         if (transactionState == null)
-            throw new IllegalStateException("Cannot prepare a transaction that had not been started: "
-                                            + info.getTransactionId());
+            throw new IllegalStateException("Cannot prepare a transaction that had not been started: " + info.getTransactionId());
         // Avoid dups.
         if (!transactionState.isPrepared()) {
             transactionState.setPrepared(true);
@@ -473,8 +470,7 @@
         return broker.messagePull(lookupConnectionState(pull.getConsumerId()).getContext(), pull);
     }
 
-    public Response processMessageDispatchNotification(MessageDispatchNotification notification)
-        throws Exception {
+    public Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception {
         broker.processDispatchNotification(notification);
         return null;
     }
@@ -503,9 +499,7 @@
         TransportConnectionState cs = lookupConnectionState(connectionId);
         SessionState ss = cs.getSessionState(sessionId);
         if (ss == null)
-            throw new IllegalStateException(
-                                            "Cannot add a producer to a session that had not been registered: "
-                                                + sessionId);
+            throw new IllegalStateException("Cannot add a producer to a session that had not been registered: " + sessionId);
         // Avoid replaying dup commands
         if (!ss.getProducerIds().contains(info.getProducerId())) {
             broker.addProducer(cs.getContext(), info);
@@ -524,9 +518,7 @@
         TransportConnectionState cs = lookupConnectionState(connectionId);
         SessionState ss = cs.getSessionState(sessionId);
         if (ss == null)
-            throw new IllegalStateException(
-                                            "Cannot remove a producer from a session that had not been registered: "
-                                                + sessionId);
+            throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: " + sessionId);
         ProducerState ps = ss.removeProducer(id);
         if (ps == null)
             throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
@@ -541,9 +533,7 @@
         TransportConnectionState cs = lookupConnectionState(connectionId);
         SessionState ss = cs.getSessionState(sessionId);
         if (ss == null)
-            throw new IllegalStateException(
-                                            "Cannot add a consumer to a session that had not been registered: "
-                                                + sessionId);
+            throw new IllegalStateException("Cannot add a consumer to a session that had not been registered: " + sessionId);
         // Avoid replaying dup commands
         if (!ss.getConsumerIds().contains(info.getConsumerId())) {
             broker.addConsumer(cs.getContext(), info);
@@ -562,9 +552,7 @@
         TransportConnectionState cs = lookupConnectionState(connectionId);
         SessionState ss = cs.getSessionState(sessionId);
         if (ss == null)
-            throw new IllegalStateException(
-                                            "Cannot remove a consumer from a session that had not been registered: "
-                                                + sessionId);
+            throw new IllegalStateException("Cannot remove a consumer from a session that had not been registered: " + sessionId);
         ConsumerState consumerState = ss.removeConsumer(id);
         if (consumerState == null)
             throw new IllegalStateException("Cannot remove a consumer that had not been registered: " + id);
@@ -641,8 +629,7 @@
             if (state.getConnection() != this) {
                 LOG.debug("Killing previous stale connection: " + state.getConnection().getRemoteAddress());
                 state.getConnection().stop();
-                LOG.debug("Connection " + getRemoteAddress() + " taking over previous connection: "
-                          + state.getConnection().getRemoteAddress());
+                LOG.debug("Connection " + getRemoteAddress() + " taking over previous connection: " + state.getConnection().getRemoteAddress());
                 state.setConnection(this);
                 state.reset(info);
             }
@@ -765,8 +752,7 @@
     }
 
     protected void processDispatch(Command command) throws IOException {
-        final MessageDispatch messageDispatch = (MessageDispatch)(command.isMessageDispatch()
-            ? command : null);
+        final MessageDispatch messageDispatch = (MessageDispatch)(command.isMessageDispatch() ? command : null);
         try {
             if (!disposed.get()) {
                 if (messageDispatch != null) {
@@ -846,8 +832,7 @@
             transport.start();
 
             if (taskRunnerFactory != null) {
-                taskRunner = taskRunnerFactory.createTaskRunner(this, "ActiveMQ Connection Dispatcher: "
-                                                                      + getRemoteAddress());
+                taskRunner = taskRunnerFactory.createTaskRunner(this, "ActiveMQ Connection Dispatcher: " + getRemoteAddress());
             } else {
                 taskRunner = null;
             }
@@ -1114,8 +1099,7 @@
                 uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
                 Transport localTransport = TransportFactory.connect(uri);
                 Transport remoteBridgeTransport = new ResponseCorrelator(transport);
-                duplexBridge = NetworkBridgeFactory.createBridge(config, localTransport,
-                                                                 remoteBridgeTransport);
+                duplexBridge = NetworkBridgeFactory.createBridge(config, localTransport, remoteBridgeTransport);
                 // now turn duplex off this side
                 info.setDuplexConnection(false);
                 duplexBridge.setCreatedByDuplex(true);
@@ -1180,8 +1164,7 @@
                     ProducerState producerState = ss.getProducerState(id);
                     if (producerState != null && producerState.getInfo() != null) {
                         ProducerInfo info = producerState.getInfo();
-                        result.setMutable(info.getDestination() == null
-                                          || info.getDestination().isComposite());
+                        result.setMutable(info.getDestination() == null || info.getDestination().isComposite());
                     }
                 }
                 producerExchanges.put(id, result);
@@ -1285,8 +1268,7 @@
     //
     // /////////////////////////////////////////////////////////////////
 
-    protected TransportConnectionState registerConnectionState(ConnectionId connectionId,
-                                                               TransportConnectionState state) {
+    protected TransportConnectionState registerConnectionState(ConnectionId connectionId, TransportConnectionState state) {
         TransportConnectionState rc = connectionState;
         connectionState = state;
         return rc;
@@ -1309,44 +1291,35 @@
     protected TransportConnectionState lookupConnectionState(String connectionId) {
         TransportConnectionState cs = connectionState;
         if (cs == null)
-            throw new IllegalStateException(
-                                            "Cannot lookup a connectionId for a connection that had not been registered: "
-                                                + connectionId);
+            throw new IllegalStateException("Cannot lookup a connectionId for a connection that had not been registered: " + connectionId);
         return cs;
     }
 
     protected TransportConnectionState lookupConnectionState(ConsumerId id) {
         TransportConnectionState cs = connectionState;
         if (cs == null)
-            throw new IllegalStateException(
-                                            "Cannot lookup a consumer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
+            throw new IllegalStateException("Cannot lookup a consumer from a connection that had not been registered: " + id.getParentId().getParentId());
         return cs;
     }
 
     protected TransportConnectionState lookupConnectionState(ProducerId id) {
         TransportConnectionState cs = connectionState;
         if (cs == null)
-            throw new IllegalStateException(
-                                            "Cannot lookup a producer from a connection that had not been registered: "
-                                                + id.getParentId().getParentId());
+            throw new IllegalStateException("Cannot lookup a producer from a connection that had not been registered: " + id.getParentId().getParentId());
         return cs;
     }
 
     protected TransportConnectionState lookupConnectionState(SessionId id) {
         TransportConnectionState cs = connectionState;
         if (cs == null)
-            throw new IllegalStateException(
-                                            "Cannot lookup a session from a connection that had not been registered: "
-                                                + id.getParentId());
+            throw new IllegalStateException("Cannot lookup a session from a connection that had not been registered: " + id.getParentId());
         return cs;
     }
 
     protected TransportConnectionState lookupConnectionState(ConnectionId connectionId) {
         TransportConnectionState cs = connectionState;
         if (cs == null)
-            throw new IllegalStateException("Cannot lookup a connection that had not been registered: "
-                                            + connectionId);
+            throw new IllegalStateException("Cannot lookup a connection that had not been registered: " + connectionId);
         return cs;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java Wed Aug  8 17:34:07 2007
@@ -20,6 +20,7 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Iterator;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
@@ -39,8 +40,6 @@
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
  * @org.apache.xbean.XBean

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.broker;
 
+import java.util.Iterator;
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -23,9 +25,6 @@
 import org.apache.activemq.ThreadPriorities;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.Iterator;
-import java.util.Set;
 
 /**
  * Used to provide information on the status of the Connection

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java Wed Aug  8 17:34:07 2007
@@ -20,6 +20,7 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.Service;
 import org.apache.activemq.broker.BrokerService;
@@ -43,7 +44,6 @@
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * Connects a Slave Broker to a Master when using <a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationView.java Wed Aug  8 17:34:07 2007
@@ -35,7 +35,6 @@
 import javax.management.openmbean.TabularType;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.jmx.OpenTypeSupport.OpenTypeFactory;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.command.ActiveMQDestination;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DestinationViewMBean.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.broker.jmx;
 
+import java.util.List;
+import java.util.Map;
+
 import javax.jms.InvalidSelectorException;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.OpenDataException;
 import javax.management.openmbean.TabularData;
-
-import java.util.List;
-import java.util.Map;
 
 
 public interface DestinationViewMBean {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/DurableSubscriptionViewMBean.java Wed Aug  8 17:34:07 2007
@@ -16,16 +16,14 @@
  */
 package org.apache.activemq.broker.jmx;
 
-import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.OpenDataException;
 import javax.management.openmbean.TabularData;
+
 /**
  * @version $Revision: 1.5 $
  */
-public interface DurableSubscriptionViewMBean extends SubscriptionViewMBean{
+public interface DurableSubscriptionViewMBean extends SubscriptionViewMBean {
     /**
      * @return name of the durable subscription name
      */
@@ -48,7 +46,8 @@
     public TabularData browseAsTable() throws OpenDataException;
 
     /**
-     * Destroys the durable subscription so that messages will no longer be stored for this subscription
+     * Destroys the durable subscription so that messages will no longer be
+     * stored for this subscription
      */
     public void destroy() throws Exception;
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java Wed Aug  8 17:34:07 2007
@@ -23,8 +23,10 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanServer;
@@ -69,9 +71,6 @@
 import org.apache.activemq.util.SubscriptionKey;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
 
 public class ManagedRegionBroker extends RegionBroker {
     private static final Log log = LogFactory.getLog(ManagedRegionBroker.class);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,12 @@
  */
 package org.apache.activemq.broker.jmx;
 
+import java.io.IOException;
+import java.util.Hashtable;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.TransportConnection;
 import org.apache.activemq.broker.TransportConnector;
@@ -27,12 +33,6 @@
 import org.apache.activemq.util.JMXSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import java.io.IOException;
-import java.util.Hashtable;
 
 /**
  * A managed transport connection

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnector.java Wed Aug  8 17:34:07 2007
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.broker.jmx;
 
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.Connection;
 import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportServer;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
 
 /**
  * A managed transport connector which can create multiple managed connections

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java Wed Aug  8 17:34:07 2007
@@ -17,11 +17,12 @@
 package org.apache.activemq.broker.jmx;
 
 import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.rmi.registry.LocateRegistry;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import javax.management.Attribute;
 import javax.management.JMException;
 import javax.management.MBeanServer;
@@ -31,11 +32,10 @@
 import javax.management.remote.JMXConnectorServer;
 import javax.management.remote.JMXConnectorServerFactory;
 import javax.management.remote.JMXServiceURL;
+
 import org.apache.activemq.Service;
-import org.apache.activemq.util.ClassLoading;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A Flow provides different dispatch policies within the NMR

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.broker.jmx;
 
+import javax.jms.InvalidSelectorException;
+
 import org.apache.activemq.broker.region.Subscription;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerInfo;
-
-import javax.jms.InvalidSelectorException;
 
 /**
  * @version $Revision: 1.5 $

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/TopicView.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,7 @@
  */
 package org.apache.activemq.broker.jmx;
 
-import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
 
 public class TopicView extends DestinationView implements TopicViewMBean {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractSubscription.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,13 @@
  */
 package org.apache.activemq.broker.region;
 
+import java.io.IOException;
+import java.util.concurrent.CopyOnWriteArrayList;
+
 import javax.jms.InvalidSelectorException;
 import javax.jms.JMSException;
 import javax.management.ObjectName;
 
-import java.io.IOException;
-
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
@@ -35,8 +36,6 @@
 import org.apache.activemq.selector.SelectorParser;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.CopyOnWriteArrayList;
 
 abstract public class AbstractSubscription implements Subscription {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/ConnectionStatistics.java Wed Aug  8 17:34:07 2007
@@ -17,7 +17,6 @@
 
 package org.apache.activemq.broker.region;
 
-
 import org.apache.activemq.management.CountStatisticImpl;
 import org.apache.activemq.management.StatsImpl;
 
@@ -53,7 +52,7 @@
         enqueues.reset();
         dequeues.reset();
     }
-    
+
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
         enqueues.setEnabled(enabled);
@@ -64,12 +63,10 @@
         if (parent != null) {
             enqueues.setParent(parent.getEnqueues());
             dequeues.setParent(parent.getDequeues());
-        }
-        else {
+        } else {
             enqueues.setParent(null);
             dequeues.setParent(null);
         }
     }
-
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationStatistics.java Wed Aug  8 17:34:07 2007
@@ -17,7 +17,6 @@
 
 package org.apache.activemq.broker.region;
 
-import org.apache.activemq.command.Message;
 import org.apache.activemq.management.CountStatisticImpl;
 import org.apache.activemq.management.PollCountStatisticImpl;
 import org.apache.activemq.management.StatsImpl;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/MessageReferenceFilter.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.broker.region;
 
-import org.apache.activemq.broker.ConnectionContext;
-
 import javax.jms.JMSException;
+
+import org.apache.activemq.broker.ConnectionContext;
 
 /**
  * Represents a filter on message references

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java Wed Aug  8 17:34:07 2007
@@ -17,14 +17,14 @@
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.LinkedList;
+
 import javax.jms.InvalidSelectorException;
 import javax.jms.JMSException;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
 import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
-import org.apache.activemq.broker.region.policy.DeadLetterStrategy;
-import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerControl;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.command.Message;
@@ -36,7 +36,6 @@
 import org.apache.activemq.command.Response;
 import org.apache.activemq.thread.Scheduler;
 import org.apache.activemq.transaction.Synchronization;
-import org.apache.activemq.util.BrokerSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueRegion.java Wed Aug  8 17:34:07 2007
@@ -16,16 +16,16 @@
  */
 package org.apache.activemq.broker.region;
 
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.jms.InvalidSelectorException;
+
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.memory.UsageManager;
 import org.apache.activemq.thread.TaskRunnerFactory;
-
-import javax.jms.InvalidSelectorException;
-
-import java.util.Iterator;
-import java.util.Set;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Region.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.broker.region;
 
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.ConsumerBrokerExchange;
@@ -28,9 +31,6 @@
 import org.apache.activemq.command.MessagePull;
 import org.apache.activemq.command.RemoveSubscriptionInfo;
 import org.apache.activemq.command.Response;
-
-import java.util.Map;
-import java.util.Set;
 
 /**
  * A Region is used to implement the different QOS options available to 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Subscription.java Wed Aug  8 17:34:07 2007
@@ -18,6 +18,9 @@
 
 import java.io.IOException;
 
+import javax.jms.InvalidSelectorException;
+import javax.management.ObjectName;
+
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerInfo;
@@ -26,9 +29,6 @@
 import org.apache.activemq.command.MessagePull;
 import org.apache.activemq.command.Response;
 import org.apache.activemq.filter.MessageEvaluationContext;
-
-import javax.jms.InvalidSelectorException;
-import javax.management.ObjectName;
 
 /**
  * @version $Revision: 1.5 $

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempQueueRegion.java Wed Aug  8 17:34:07 2007
@@ -18,7 +18,7 @@
 
 import javax.jms.InvalidSelectorException;
 import javax.jms.JMSException;
-import org.apache.activemq.broker.Broker;
+
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQTempDestination;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TempTopicRegion.java Wed Aug  8 17:34:07 2007
@@ -15,9 +15,8 @@
 package org.apache.activemq.broker.region;
 
 import javax.jms.JMSException;
+
 import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.broker.region.cursors.VMPendingMessageCursor;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerInfo;
@@ -31,7 +30,7 @@
  */
 public class TempTopicRegion extends AbstractRegion {
 
-    private static final Log log = LogFactory.getLog(TempTopicRegion.class);
+    private static final Log LOG = LogFactory.getLog(TempTopicRegion.class);
 
     public TempTopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory,
                            DestinationFactory destinationFactory) {
@@ -58,7 +57,7 @@
             answer.init();
             return answer;
         } catch (Exception e) {
-            log.error("Failed to create TopicSubscription ", e);
+            LOG.error("Failed to create TopicSubscription ", e);
             JMSException jmsEx = new JMSException("Couldn't create TopicSubscription");
             jmsEx.setLinkedException(e);
             throw jmsEx;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java Wed Aug  8 17:34:07 2007
@@ -17,8 +17,9 @@
 import java.io.IOException;
 import java.util.LinkedList;
 import java.util.concurrent.atomic.AtomicLong;
-import javax.jms.InvalidSelectorException;
+
 import javax.jms.JMSException;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java Wed Aug  8 17:34:07 2007
@@ -23,15 +23,16 @@
 import org.apache.activemq.memory.UsageManager;
 
 /**
- * Interface to pending message (messages awaiting disptach to a consumer) cursor
+ * Interface to pending message (messages awaiting disptach to a consumer)
+ * cursor
  * 
  * @version $Revision$
  */
-public interface PendingMessageCursor extends Service{
-    
-    
+public interface PendingMessageCursor extends Service {
+
     /**
      * Add a destination
+     * 
      * @param context
      * @param destination
      * @throws Exception
@@ -40,53 +41,57 @@
 
     /**
      * remove a destination
+     * 
      * @param context
      * @param destination
      * @throws Exception
      */
     public void remove(ConnectionContext context, Destination destination) throws Exception;
+
     /**
      * @return true if there are no pending messages
      */
     public boolean isEmpty();
-    
+
     /**
      * check if a Destination is Empty for this cursor
+     * 
      * @param destination
      * @return true id the Destination is empty
      */
     public boolean isEmpty(Destination destination);
-    
+
     /**
      * reset the cursor
-     *
      */
     public void reset();
-    
+
     /**
-     * hint to the cursor to release any locks it might have
-     * grabbed after a reset
-     *
+     * hint to the cursor to release any locks it might have grabbed after a
+     * reset
      */
     public void release();
 
     /**
      * add message to await dispatch
+     * 
      * @param node
-     * @throws IOException 
-     * @throws Exception 
+     * @throws IOException
+     * @throws Exception
      */
-    public void addMessageLast(MessageReference node) throws  Exception;
-    
+    public void addMessageLast(MessageReference node) throws Exception;
+
     /**
      * add message to await dispatch
+     * 
      * @param node
-     * @throws Exception 
+     * @throws Exception
      */
     public void addMessageFirst(MessageReference node) throws Exception;
-    
+
     /**
      * Add a message recovered from a retroactive policy
+     * 
      * @param node
      * @throws Exception
      */
@@ -104,7 +109,6 @@
 
     /**
      * remove the message at the cursor position
-     * 
      */
     public void remove();
 
@@ -115,17 +119,17 @@
 
     /**
      * clear all pending messages
-     * 
      */
     public void clear();
-    
+
     /**
-     * Informs the Broker if the subscription needs to intervention to recover it's state
-     * e.g. DurableTopicSubscriber may do
+     * Informs the Broker if the subscription needs to intervention to recover
+     * it's state e.g. DurableTopicSubscriber may do
+     * 
      * @return true if recovery required
      */
     public boolean isRecoveryRequired();
-    
+
     /**
      * @return the maximum batch size
      */
@@ -133,75 +137,75 @@
 
     /**
      * Set the max batch size
+     * 
      * @param maxBatchSize
      */
     public void setMaxBatchSize(int maxBatchSize);
 
     /**
-     * Give the cursor a hint that we are about to remove
-     * messages from memory only
+     * Give the cursor a hint that we are about to remove messages from memory
+     * only
      */
     public void resetForGC();
-    
+
     /**
      * remove a node
+     * 
      * @param node
      */
     public void remove(MessageReference node);
-    
-    
+
     /**
      * free up any internal buffers
-     *
      */
     public void gc();
-    
+
     /**
      * Set the UsageManager
+     * 
      * @param usageManager
      * @see org.apache.activemq.memory.UsageManager
      */
     public void setUsageManager(UsageManager usageManager);
-    
+
     /**
      * @return the usageManager
      */
     public UsageManager getUsageManager();
-    
+
     /**
      * @return the memoryUsageHighWaterMark
      */
     public int getMemoryUsageHighWaterMark();
 
-    
     /**
      * @param memoryUsageHighWaterMark the memoryUsageHighWaterMark to set
      */
     public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark);
 
-    
     /**
      * @return true if the cursor is full
      */
     public boolean isFull();
-    
+
     /**
      * @return true if the cursor has buffered messages ready to deliver
      */
     public boolean hasMessagesBufferedToDeliver();
-    
+
     /**
      * destroy the cursor
-     * @throws Exception 
+     * 
+     * @throws Exception
      */
     public void destroy() throws Exception;
-    
+
     /**
      * Page in a restricted number of messages
+     * 
      * @param maxItems
      * @return a list of paged in messages
      */
     public LinkedList pageInList(int maxItems);
-    
-    
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java Wed Aug  8 17:34:07 2007
@@ -19,6 +19,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
+
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Destination;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/MessageGroupHashBucket.java Wed Aug  8 17:34:07 2007
@@ -80,8 +80,7 @@
         final MessageGroupSet answer = createMessageGroupSet(bucketNumber);
         if (parent == null) {
             return answer;
-        }
-        else {
+        } else {
             // union the two sets together
             return new MessageGroupSet() {
                 public boolean contains(String groupID) {
@@ -103,7 +102,7 @@
     protected int getBucketNumber(String groupId) {
         int bucket = groupId.hashCode() % bucketCount;
         // bucket could be negative
-        if( bucket < 0 )
+        if (bucket < 0)
             bucket *= -1;
         return bucket;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/group/SimpleMessageGroupMap.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,11 @@
  */
 package org.apache.activemq.broker.region.group;
 
+import java.util.Iterator;
+import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.command.ConsumerId;
-
-import java.util.Iterator;
-import java.util.Map;
 
 /**
  * A simple implementation which tracks every individual GroupID value but

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java Wed Aug  8 17:34:07 2007
@@ -32,10 +32,10 @@
         boolean result = false;
         if (message != null) {
             result = true;
-            if (message.isPersistent() == false && processNonPersistent == false) {
+            if (!message.isPersistent() && !processNonPersistent) {
                 result = false;
             }
-            if (message.isExpired() && processExpired == false) {
+            if (message.isExpired() && !processExpired) {
                 result = false;
             }
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java Wed Aug  8 17:34:07 2007
@@ -18,7 +18,6 @@
 
 import java.util.List;
 
-import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.filter.MessageEvaluationContext;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/FixedCountSubscriptionRecoveryPolicy.java Wed Aug  8 17:34:07 2007
@@ -18,15 +18,14 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
 import org.apache.activemq.broker.region.SubscriptionRecovery;
 import org.apache.activemq.broker.region.Topic;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.Message;
 import org.apache.activemq.filter.DestinationFilter;
-import org.apache.activemq.filter.MessageEvaluationContext;
 
 /**
  * This implementation of {@link SubscriptionRecoveryPolicy} will keep a fixed



Mime
View raw message