activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564057 [3/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/broker/region/policy/IndividualDeadLetterStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/IndividualDeadLetterStrategy.java Wed Aug  8 17:34:07 2007
@@ -25,7 +25,6 @@
  * DLQ using the subject naming hierarchy.
  * 
  * @org.apache.xbean.XBean
- * 
  * @version $Revision$
  */
 public class IndividualDeadLetterStrategy extends AbstractDeadLetterStrategy {
@@ -38,8 +37,7 @@
     public ActiveMQDestination getDeadLetterQueueFor(ActiveMQDestination originalDestination) {
         if (originalDestination.isQueue()) {
             return createDestination(originalDestination, queuePrefix, useQueueForQueueMessages);
-        }
-        else {
+        } else {
             return createDestination(originalDestination, topicPrefix, useQueueForTopicMessages);
         }
     }
@@ -99,8 +97,7 @@
         String name = prefix + originalDestination.getPhysicalName();
         if (useQueue) {
             return new ActiveMQQueue(name);
-        }
-        else {
+        } else {
             return new ActiveMQTopic(name);
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageEvictionStrategy.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker.region.policy;
 
-import org.apache.activemq.broker.region.MessageReference;
-
 import java.io.IOException;
 import java.util.LinkedList;
+
+import org.apache.activemq.broker.region.MessageReference;
 
 /**
  * A strategy for evicting messages from slow consumers.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/MessageQuery.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker.region.policy;
 
+import javax.jms.MessageListener;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.Message;
-
-import javax.jms.MessageListener;
 
 /**
  * Represents some kind of query which will load initial messages from some source for a new topic subscriber.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/NoSubscriptionRecoveryPolicy.java Wed Aug  8 17:34:07 2007
@@ -18,7 +18,6 @@
 
 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;
@@ -28,12 +27,10 @@
  * This SubscriptionRecoveryPolicy disable recovery of messages.
  * 
  * @org.apache.xbean.XBean
- * 
  * @version $Revision$
  */
 public class NoSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
 
-
     public SubscriptionRecoveryPolicy copy() {
         // This object is immutable
         return this;
@@ -52,7 +49,7 @@
     public void stop() throws Exception {
     }
 
-    public Message[] browse(ActiveMQDestination dest) throws Exception{
+    public Message[] browse(ActiveMQDestination dest) throws Exception {
         return new Message[0];
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageEvictionStrategy.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.broker.region.policy;
 
-import org.apache.activemq.broker.region.MessageReference;
-
 import java.util.LinkedList;
+
+import org.apache.activemq.broker.region.MessageReference;
 
 /**
  * An eviction strategy which evicts the oldest message first (which is the

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/OldestMessageWithLowestPriorityEvictionStrategy.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.broker.region.policy;
 
-import org.apache.activemq.broker.region.MessageReference;
-
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.LinkedList;
+
+import org.apache.activemq.broker.region.MessageReference;
 
 /**
  * An eviction strategy which evicts the oldest message with the lowest priority first.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PendingQueueMessageStoragePolicy.java Wed Aug  8 17:34:07 2007
@@ -18,20 +18,20 @@
 import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
 import org.apache.activemq.kaha.Store;
 
-
 /**
- * Abstraction to allow different policies for holding messages awaiting dispatch on a Queue
+ * Abstraction to allow different policies for holding messages awaiting
+ * dispatch on a Queue
  * 
  * @version $Revision$
  */
-public interface PendingQueueMessageStoragePolicy{
+public interface PendingQueueMessageStoragePolicy {
 
     /**
      * Retrieve the configured pending message storage cursor;
-     * @param queue 
+     * 
+     * @param queue
      * @param tmpStore
      * @return the cursor
-     * 
      */
     public PendingMessageCursor getQueuePendingMessageCursor(Queue queue, Store tmpStore);
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker.region.policy;
 
+import java.util.List;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.filter.DestinationMap;
-
-import java.util.List;
 
 /**
  * Represents a destination based configuration of policies so that individual

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java Wed Aug  8 17:34:07 2007
@@ -16,21 +16,27 @@
  */
 package org.apache.activemq.broker.region.policy;
 
+import java.util.concurrent.atomic.AtomicLong;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+
 import org.apache.activemq.ActiveMQMessageTransformation;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.broker.region.SubscriptionRecovery;
 import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.ConnectionId;
+import org.apache.activemq.command.MessageId;
+import org.apache.activemq.command.ProducerId;
+import org.apache.activemq.command.SessionId;
 import org.apache.activemq.util.IdGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import java.util.concurrent.atomic.AtomicLong;
 
 /**
  * This implementation of {@link SubscriptionRecoveryPolicy} will perform a user

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/SubscriptionRecoveryPolicy.java Wed Aug  8 17:34:07 2007
@@ -20,7 +20,6 @@
 import org.apache.activemq.Service;
 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;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestination.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.broker.region.virtual;
 
-import org.apache.activemq.broker.region.Destination;
-
 import java.util.Collection;
+
+import org.apache.activemq.broker.region.Destination;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationInterceptor.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationInterceptor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/CompositeDestinationInterceptor.java Wed Aug  8 17:34:07 2007
@@ -29,7 +29,7 @@
 /**
  * Represents a composite {@link Destination} where send()s are replicated to
  * each Destination instance.
- *
+ * 
  * @version $Revision$
  */
 public class CompositeDestinationInterceptor extends DestinationFilter {
@@ -53,7 +53,7 @@
             Object value = iter.next();
 
             if (value instanceof FilteredDestination) {
-                FilteredDestination filteredDestination = (FilteredDestination) value;
+                FilteredDestination filteredDestination = (FilteredDestination)value;
                 if (messageContext == null) {
                     messageContext = new MessageEvaluationContext();
                     messageContext.setMessageReference(message);
@@ -62,9 +62,8 @@
                 if (filteredDestination.matches(messageContext)) {
                     destination = filteredDestination.getDestination();
                 }
-            }
-            else if (value instanceof ActiveMQDestination) {
-                destination = (ActiveMQDestination) value;
+            } else if (value instanceof ActiveMQDestination) {
+                destination = (ActiveMQDestination)value;
             }
             if (destination == null) {
                 continue;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/FilteredDestination.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.broker.region.virtual;
 
+import javax.jms.InvalidSelectorException;
+import javax.jms.JMSException;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.filter.BooleanExpression;
 import org.apache.activemq.filter.MessageEvaluationContext;
 import org.apache.activemq.selector.SelectorParser;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
 
 /**
  * Represents a destination which is filtered using some predicate such as a selector

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/virtual/VirtualDestinationInterceptor.java Wed Aug  8 17:34:07 2007
@@ -30,11 +30,9 @@
 
 /**
  * Implements <a
- * href="http://activemq.apache.org/virtual-destinations.html">Virtual
- * Topics</a>.
+ * href="http://activemq.apache.org/virtual-destinations.html">Virtual Topics</a>.
  * 
  * @org.apache.xbean.XBean
- * 
  * @version $Revision$
  */
 public class VirtualDestinationInterceptor implements DestinationInterceptor {
@@ -46,15 +44,14 @@
         Set virtualDestinations = destinationMap.get(destination.getActiveMQDestination());
         List destinations = new ArrayList();
         for (Iterator iter = virtualDestinations.iterator(); iter.hasNext();) {
-            VirtualDestination virtualDestination = (VirtualDestination) iter.next();
+            VirtualDestination virtualDestination = (VirtualDestination)iter.next();
             Destination newNestination = virtualDestination.intercept(destination);
             destinations.add(newNestination);
         }
         if (!destinations.isEmpty()) {
             if (destinations.size() == 1) {
-                return (Destination) destinations.get(0);
-            }
-            else {
+                return (Destination)destinations.get(0);
+            } else {
                 // should rarely be used but here just in case
                 return createCompositeDestination(destination, destinations);
             }
@@ -79,7 +76,7 @@
         return new DestinationFilter(destination) {
             public void send(ProducerBrokerExchange context, Message messageSend) throws Exception {
                 for (Iterator iter = destinations.iterator(); iter.hasNext();) {
-                    Destination destination = (Destination) iter.next();
+                    Destination destination = (Destination)iter.next();
                     destination.send(context, messageSend);
                 }
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.broker.util;
 
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.Session;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.Service;
 import org.apache.activemq.advisory.AdvisorySupport;
@@ -23,19 +30,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.FactoryBean;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
+import org.springframework.beans.factory.InitializingBean;
 
 /**
  * An agent which listens to commands on a JMS destination
- *
+ * 
  * @version $Revision$
  * @org.apache.xbean.XBean
  */
@@ -50,7 +50,6 @@
     private Session session;
     private MessageConsumer consumer;
 
-
     public void start() throws Exception {
         session = getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
         listener = new CommandMessageListener(session);
@@ -68,8 +67,7 @@
             try {
                 consumer.close();
                 consumer = null;
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 stopper.onException(this, e);
             }
         }
@@ -77,8 +75,7 @@
             try {
                 session.close();
                 session = null;
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 stopper.onException(this, e);
             }
         }
@@ -86,15 +83,15 @@
             try {
                 connection.close();
                 connection = null;
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 stopper.onException(this, e);
             }
         }
         stopper.throwFirstException();
     }
 
-    // the following methods ensure that we are created on startup and the lifecycles respected
+    // the following methods ensure that we are created on startup and the
+    // lifecycles respected
     // TODO there must be a simpler way?
     public void afterPropertiesSet() throws Exception {
         start();
@@ -116,10 +113,8 @@
         return true;
     }
 
-
-
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public String getBrokerUrl() {
         return brokerUrl;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandHandler.java Wed Aug  8 17:34:07 2007
@@ -17,7 +17,6 @@
 package org.apache.activemq.broker.util;
 
 import javax.jms.TextMessage;
-import javax.jms.JMSException;
 
 /**
  * Represents a processor of text based commands

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DotFileInterceptorSupport.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.broker.view;
 
+import java.io.FileWriter;
+import java.io.PrintWriter;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerFilter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.FileWriter;
-import java.io.PrintWriter;
-
 /**
  * Useful base class
  * 
@@ -46,8 +46,7 @@
         PrintWriter writer = new PrintWriter(new FileWriter(file));
         try {
             generateFile(writer);
-        }
-        finally {
+        } finally {
             writer.close();
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelDestination.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelDestination.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,6 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.ActiveMQSession;
-import org.apache.activemq.CustomDestination;
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.Endpoint;
-import org.apache.camel.component.jms.JmsBinding;
-
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
@@ -31,6 +23,14 @@
 import javax.jms.QueueSender;
 import javax.jms.TopicPublisher;
 import javax.jms.TopicSubscriber;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.ActiveMQSession;
+import org.apache.activemq.CustomDestination;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.Endpoint;
+import org.apache.camel.component.jms.JmsBinding;
 
 /**
  * @version $Revision: $

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,12 @@
  */
 package org.apache.activemq.camel;
 
+import javax.jms.IllegalStateException;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.camel.Consumer;
@@ -24,13 +30,10 @@
 import org.apache.camel.PollingConsumer;
 import org.apache.camel.Processor;
 
-import javax.jms.*;
-import javax.jms.IllegalStateException;
-
 /**
- * A JMS {@link javax.jms.MessageConsumer} which consumes message exchanges from a
- * Camel {@link Endpoint}
- *
+ * A JMS {@link javax.jms.MessageConsumer} which consumes message exchanges from
+ * a Camel {@link Endpoint}
+ * 
  * @version $Revision: $
  */
 public class CamelMessageConsumer implements MessageConsumer {
@@ -62,11 +65,9 @@
                 if (pollingConsumer != null) {
                     pollingConsumer.stop();
                 }
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 throw e;
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw JMSExceptionSupport.create(e);
             }
         }
@@ -99,7 +100,7 @@
     }
 
     // Properties
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
 
     public CamelDestination getDestination() {
         return destination;
@@ -122,7 +123,7 @@
     }
 
     // Implementation methods
-    //-----------------------------------------------------------------------
+    // -----------------------------------------------------------------------
 
     protected PollingConsumer getPollingConsumer() throws JMSException {
         try {
@@ -131,11 +132,9 @@
                 pollingConsumer.start();
             }
             return pollingConsumer;
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw JMSExceptionSupport.create(e);
         }
     }
@@ -144,8 +143,7 @@
         if (exchange != null) {
             Message message = destination.getBinding().makeJmsMessage(exchange, session);
             return message;
-        }
-        else {
+        } else {
             return null;
         }
     }
@@ -160,11 +158,9 @@
             });
             answer.start();
             return answer;
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw JMSExceptionSupport.create(e);
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,11 @@
  */
 package org.apache.activemq.camel;
 
+import javax.jms.Destination;
+import javax.jms.IllegalStateException;
+import javax.jms.JMSException;
+import javax.jms.Message;
+
 import org.apache.activemq.ActiveMQMessageProducerSupport;
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.util.JMSExceptionSupport;
@@ -24,11 +29,6 @@
 import org.apache.camel.component.jms.JmsExchange;
 import org.apache.camel.util.ObjectHelper;
 
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
 /**
  * A JMS {@link javax.jms.MessageProducer} which sends message exchanges to a
  * Camel {@link Endpoint}
@@ -47,11 +47,9 @@
         this.endpoint = endpoint;
         try {
             this.producer = endpoint.createProducer();
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw JMSExceptionSupport.create(e);
         }
     }
@@ -69,33 +67,28 @@
             closed = true;
             try {
                 producer.stop();
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                 throw e;
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw JMSExceptionSupport.create(e);
             }
         }
     }
 
     public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
-    	CamelDestination camelDestination = null;
+        CamelDestination camelDestination = null;
         if (ObjectHelper.equals(destination, this.destination)) {
             camelDestination = this.destination;
-        }
-        else {
+        } else {
             // TODO support any CamelDestination?
             throw new IllegalArgumentException("Invalid destination setting: " + destination + " when expected: " + this.destination);
         }
         try {
             JmsExchange exchange = new JmsExchange(endpoint.getContext(), camelDestination.getBinding(), message);
             producer.process(exchange);
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw JMSExceptionSupport.create(e);
         }
     }
@@ -105,4 +98,4 @@
             throw new IllegalStateException("The producer is closed");
         }
     }
-}
\ No newline at end of file
+}

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueue.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueue.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueue.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-
 import javax.jms.JMSException;
 import javax.jms.Queue;
-import javax.jms.QueueSender;
 import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+
+import org.apache.activemq.ActiveMQSession;
 
 /**
  * A JMS {@link Queue} object which refers to a Camel endpoint

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-import org.apache.camel.Endpoint;
-
 import javax.jms.JMSException;
 import javax.jms.Queue;
 import javax.jms.QueueReceiver;
+
+import org.apache.activemq.ActiveMQSession;
+import org.apache.camel.Endpoint;
 
 /**
  * A JMS {@link javax.jms.QueueReceiver} which consumes message exchanges from a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopic.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopic.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopic.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-
 import javax.jms.JMSException;
 import javax.jms.Topic;
 import javax.jms.TopicPublisher;
 import javax.jms.TopicSubscriber;
+
+import org.apache.activemq.ActiveMQSession;
 
 /**
  * A JMS {@link javax.jms.Topic} object which refers to a Camel endpoint

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-import org.apache.camel.Endpoint;
-
 import javax.jms.JMSException;
-import javax.jms.TopicPublisher;
-import javax.jms.Topic;
 import javax.jms.Message;
+import javax.jms.Topic;
+import javax.jms.TopicPublisher;
+
+import org.apache.activemq.ActiveMQSession;
+import org.apache.camel.Endpoint;
 
 /**
  * A JMS {@link javax.jms.TopicPublisher} which sends message exchanges to a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-import org.apache.camel.Endpoint;
-
 import javax.jms.JMSException;
 import javax.jms.Topic;
 import javax.jms.TopicSubscriber;
+
+import org.apache.activemq.ActiveMQSession;
+import org.apache.camel.Endpoint;
 
 /**
  * A JMS {@link javax.jms.TopicSubscriber} which consumes message exchanges from a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java Wed Aug  8 17:34:07 2007
@@ -16,19 +16,20 @@
  */
 package org.apache.activemq.command;
 
-import org.apache.activemq.BlobMessage;
-import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-import javax.jms.JMSException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 
+import javax.jms.JMSException;
+
+import org.apache.activemq.BlobMessage;
+import org.apache.activemq.blob.BlobUploader;
+import org.apache.activemq.util.JMSExceptionSupport;
+
 /**
  * An implementation of {@link BlobMessage} for out of band BLOB transfer
- *
+ * 
  * @version $Revision: $
  * @openwire:marshaller code="29"
  */
@@ -45,7 +46,6 @@
     private transient BlobUploader blobUploader;
     private transient URL url;
 
-
     public Message copy() {
         ActiveMQBlobMessage copy = new ActiveMQBlobMessage();
         copy(copy);
@@ -76,8 +76,9 @@
     }
 
     /**
-     * The MIME type of the BLOB which can be used to apply different content types to messages.
-     *
+     * The MIME type of the BLOB which can be used to apply different content
+     * types to messages.
+     * 
      * @openwire:property version=3 cache=true
      */
     public String getMimeType() {
@@ -96,8 +97,9 @@
     }
 
     /**
-     * The name of the attachment which can be useful information if transmitting files over ActiveMQ
-     *
+     * The name of the attachment which can be useful information if
+     * transmitting files over ActiveMQ
+     * 
      * @openwire:property version=3 cache=false
      */
     public void setName(String name) {
@@ -131,8 +133,7 @@
         if (url == null && remoteBlobUrl != null) {
             try {
                 url = new URL(remoteBlobUrl);
-            }
-            catch (MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 throw JMSExceptionSupport.create(e);
             }
         }
@@ -144,7 +145,6 @@
         remoteBlobUrl = url != null ? url.toExternalForm() : null;
     }
 
-
     public BlobUploader getBlobUploader() {
         return blobUploader;
     }
@@ -156,13 +156,13 @@
     public void onSend() throws JMSException {
         super.onSend();
 
-        // lets ensure we upload the BLOB first out of band before we send the message
+        // lets ensure we upload the BLOB first out of band before we send the
+        // message
         if (blobUploader != null) {
             try {
                 URL value = blobUploader.upload(this);
                 setURL(value);
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                 throw JMSExceptionSupport.create(e);
             }
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java Wed Aug  8 17:34:07 2007
@@ -16,16 +16,28 @@
  */
 package org.apache.activemq.command;
 
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.*;
-
-import javax.jms.*;
-import java.io.*;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.EOFException;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.zip.Deflater;
 import java.util.zip.DeflaterOutputStream;
 import java.util.zip.InflaterInputStream;
+
+import javax.jms.BytesMessage;
+import javax.jms.JMSException;
+import javax.jms.MessageFormatException;
+import javax.jms.MessageNotReadableException;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.util.ByteArrayInputStream;
+import org.apache.activemq.util.ByteArrayOutputStream;
+import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.ByteSequenceData;
+import org.apache.activemq.util.JMSExceptionSupport;
 
 /**
  * A <CODE>BytesMessage</CODE> object is used to send a message containing a

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java Wed Aug  8 17:34:07 2007
@@ -16,26 +16,26 @@
  */
 package org.apache.activemq.command;
 
-import org.apache.activemq.jndi.JNDIBaseStorable;
-import org.apache.activemq.util.IntrospectionSupport;
-import org.apache.activemq.util.URISupport;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.Topic;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 import java.util.StringTokenizer;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.TemporaryQueue;
+import javax.jms.TemporaryTopic;
+import javax.jms.Topic;
+
+import org.apache.activemq.jndi.JNDIBaseStorable;
+import org.apache.activemq.util.IntrospectionSupport;
+import org.apache.activemq.util.URISupport;
 
 /**
  * @openwire:marshaller

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java Wed Aug  8 17:34:07 2007
@@ -142,7 +142,6 @@
      * Builds the message body from data
      * 
      * @throws JMSException
-     * 
      * @throws IOException
      */
     private void loadContent() throws JMSException {
@@ -503,7 +502,7 @@
      */
     public void setBoolean(String name, boolean value) throws JMSException {
         initializeWriting();
-        put(name, (value) ? Boolean.TRUE : Boolean.FALSE);
+        put(name, value ? Boolean.TRUE : Boolean.FALSE);
     }
 
     /**

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java Wed Aug  8 17:34:07 2007
@@ -415,8 +415,11 @@
     }
 
     protected void checkValidObject(Object value) throws MessageFormatException {
-        if (!(value instanceof Boolean || value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long || value instanceof Float
-              || value instanceof Double || value instanceof Character || value instanceof String || value == null)) {
+        
+        boolean valid = value instanceof Boolean || value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long ;
+        valid = valid || value instanceof Float || value instanceof Double || value instanceof Character || value instanceof String || value == null;
+        
+        if (!valid) {
 
             ActiveMQConnection conn = getConnection();
             // conn is null if we are in the broker rather than a JMS client

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java Wed Aug  8 17:34:07 2007
@@ -17,15 +17,6 @@
 
 package org.apache.activemq.command;
 
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoadingAwareObjectInputStream;
-import org.apache.activemq.util.JMSExceptionSupport;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -35,6 +26,16 @@
 import java.io.Serializable;
 import java.util.zip.DeflaterOutputStream;
 import java.util.zip.InflaterInputStream;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.util.ByteArrayInputStream;
+import org.apache.activemq.util.ByteArrayOutputStream;
+import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.ClassLoadingAwareObjectInputStream;
+import org.apache.activemq.util.JMSExceptionSupport;
 
 /**
  * An <CODE>ObjectMessage</CODE> object is used to send a message that

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java Wed Aug  8 17:34:07 2007
@@ -16,17 +16,6 @@
  */
 package org.apache.activemq.command;
 
-import org.apache.activemq.ActiveMQConnection;
-import org.apache.activemq.util.ByteArrayInputStream;
-import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.JMSExceptionSupport;
-import org.apache.activemq.util.MarshallingSupport;
-import org.apache.activemq.wireformat.WireFormat;
-
-import javax.jms.JMSException;
-import javax.jms.MessageNotWriteableException;
-import javax.jms.TextMessage;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -34,6 +23,18 @@
 import java.io.OutputStream;
 import java.util.zip.DeflaterOutputStream;
 import java.util.zip.InflaterInputStream;
+
+import javax.jms.JMSException;
+import javax.jms.MessageNotWriteableException;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.ActiveMQConnection;
+import org.apache.activemq.util.ByteArrayInputStream;
+import org.apache.activemq.util.ByteArrayOutputStream;
+import org.apache.activemq.util.ByteSequence;
+import org.apache.activemq.util.JMSExceptionSupport;
+import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.wireformat.WireFormat;
 
 /**
  * @openwire:marshaller code="28"

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveSubscriptionInfo.java Wed Aug  8 17:34:07 2007
@@ -19,19 +19,17 @@
 import org.apache.activemq.state.CommandVisitor;
 
 /**
- *
  * @openwire:marshaller code="9"
  * @version $Revision: 1.7 $
  */
 public class RemoveSubscriptionInfo extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.REMOVE_SUBSCRIPTION_INFO;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_SUBSCRIPTION_INFO;
 
     protected ConnectionId connectionId;
     protected String clientId;
     protected String subscriptionName;
 
-
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
@@ -42,6 +40,7 @@
     public ConnectionId getConnectionId() {
         return connectionId;
     }
+
     public void setConnectionId(ConnectionId connectionId) {
         this.connectionId = connectionId;
     }
@@ -60,7 +59,7 @@
     public void setSubcriptionName(String subscriptionName) {
         this.subscriptionName = subscriptionName;
     }
-    
+
     public String getSubscriptionName() {
         return subscriptionName;
     }
@@ -81,7 +80,7 @@
     }
 
     public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processRemoveSubscription( this );
+        return visitor.processRemoveSubscription(this);
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Response.java Wed Aug  8 17:34:07 2007
@@ -23,10 +23,10 @@
  * @version $Revision: 1.6 $
  */
 public class Response extends BaseCommand {
-    
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.RESPONSE;
+
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.RESPONSE;
     int correlationId;
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
@@ -37,11 +37,11 @@
     public int getCorrelationId() {
         return correlationId;
     }
-    
+
     public void setCorrelationId(int responseId) {
         this.correlationId = responseId;
     }
-    
+
     public boolean isResponse() {
         return true;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/CompositeDestinationFilter.java Wed Aug  8 17:34:07 2007
@@ -20,11 +20,11 @@
 
 /**
  * A {@link DestinationFilter} used for composite destinations
- *
+ * 
  * @version $Revision: 1.3 $
  */
 public class CompositeDestinationFilter extends DestinationFilter {
-    
+
     private DestinationFilter filters[];
 
     public CompositeDestinationFilter(ActiveMQDestination destination) {
@@ -32,7 +32,7 @@
         filters = new DestinationFilter[destinations.length];
         for (int i = 0; i < destinations.length; i++) {
             ActiveMQDestination childDestination = destinations[i];
-            filters[i]= DestinationFilter.parseFilter(childDestination);
+            filters[i] = DestinationFilter.parseFilter(childDestination);
         }
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMap.java Wed Aug  8 17:34:07 2007
@@ -51,8 +51,7 @@
      * or composite destinations this will typically be a List of matching
      * values.
      * 
-     * @param key
-     *            the destination to lookup
+     * @param key the destination to lookup
      * @return a List of matching values or an empty list if there are no
      *         matching values.
      */
@@ -64,9 +63,8 @@
                 ActiveMQDestination childDestination = destinations[i];
                 Object value = get(childDestination);
                 if (value instanceof Set) {
-                    answer.addAll((Set) value);
-                }
-                else if (value != null) {
+                    answer.addAll((Set)value);
+                } else if (value != null) {
                     answer.add(value);
                 }
             }
@@ -108,7 +106,7 @@
     public int getTopicRootChildCount() {
         return topicRootNode.getChildCount();
     }
-    
+
     public int getQueueRootChildCount() {
         return queueRootNode.getChildCount();
     }
@@ -121,7 +119,6 @@
         return topicRootNode;
     }
 
-    
     // Implementation methods
     // -------------------------------------------------------------------------
 
@@ -131,13 +128,12 @@
      */
     protected void setEntries(List entries) {
         for (Iterator iter = entries.iterator(); iter.hasNext();) {
-            Object element = (Object) iter.next();
+            Object element = (Object)iter.next();
             Class type = getEntryClass();
             if (type.isInstance(element)) {
-                DestinationMapEntry entry = (DestinationMapEntry) element;
+                DestinationMapEntry entry = (DestinationMapEntry)element;
                 put(entry.getDestination(), entry.getValue());
-            }
-            else {
+            } else {
                 throw new IllegalArgumentException("Each entry must be an instance of type: " + type.getName() + " but was: " + element);
             }
         }
@@ -162,14 +158,14 @@
 
     /**
      * @param key
-     * @return 
+     * @return
      */
     public Set removeAll(ActiveMQDestination key) {
         Set rc = new HashSet();
         if (key.isComposite()) {
             ActiveMQDestination[] destinations = key.getCompositeDestinations();
             for (int i = 0; i < destinations.length; i++) {
-                rc.add( removeAll(destinations[i]) );
+                rc.add(removeAll(destinations[i]));
             }
             return rc;
         }
@@ -183,8 +179,7 @@
      * no matching value. If there are multiple values, the results are sorted
      * and the last item (the biggest) is returned.
      * 
-     * @param destination
-     *            the destination to find the value for
+     * @param destination the destination to find the value for
      * @return the largest matching value or null if no value matches
      */
     public Object chooseValue(ActiveMQDestination destination) {
@@ -202,8 +197,7 @@
     protected DestinationMapNode getRootNode(ActiveMQDestination key) {
         if (key.isQueue()) {
             return queueRootNode;
-        }
-        else {
+        } else {
             return topicRootNode;
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java Wed Aug  8 17:34:07 2007
@@ -31,16 +31,13 @@
 
     private ActiveMQDestination destination;
 
-    
     public int compareTo(Object that) {
         if (that instanceof DestinationMapEntry) {
-            DestinationMapEntry thatEntry = (DestinationMapEntry) that;
+            DestinationMapEntry thatEntry = (DestinationMapEntry)that;
             return ActiveMQDestination.compare(destination, thatEntry.destination);
-        }
-        else if (that == null) {
+        } else if (that == null) {
             return 1;
-        }
-        else {
+        } else {
             return getClass().getName().compareTo(that.getClass().getName());
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapNode.java Wed Aug  8 17:34:07 2007
@@ -20,10 +20,10 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.Iterator;
 
 /**
  * An implementation class used to implement {@link DestinationMap}

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/DestinationPath.java Wed Aug  8 17:34:07 2007
@@ -27,7 +27,7 @@
 
 /**
  * Helper class for decomposing a Destination into a number of paths
- *
+ * 
  * @version $Revision: 1.3 $
  */
 public class DestinationPath {
@@ -61,7 +61,7 @@
 
     /**
      * Converts the paths to a single String seperated by dots.
-     *
+     * 
      * @param paths
      * @return
      */
@@ -74,8 +74,7 @@
             String path = paths[i];
             if (path == null) {
                 buffer.append("*");
-            }
-            else {
+            } else {
                 buffer.append(path);
             }
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/LogicExpression.java Wed Aug  8 17:34:07 2007
@@ -27,17 +27,17 @@
 
     public static BooleanExpression createOR(BooleanExpression lvalue, BooleanExpression rvalue) {
         return new LogicExpression(lvalue, rvalue) {
-        	
+
             public Object evaluate(MessageEvaluationContext message) throws JMSException {
-                
-            	Boolean lv = (Boolean) left.evaluate(message);
+
+                Boolean lv = (Boolean)left.evaluate(message);
                 // Can we do an OR shortcut??
-            	if (lv !=null && lv.booleanValue()) {
+                if (lv != null && lv.booleanValue()) {
                     return Boolean.TRUE;
                 }
-            	
-                Boolean rv = (Boolean) right.evaluate(message);
-                return rv==null ? null : rv;
+
+                Boolean rv = (Boolean)right.evaluate(message);
+                return rv == null ? null : rv;
             }
 
             public String getExpressionSymbol() {
@@ -51,7 +51,7 @@
 
             public Object evaluate(MessageEvaluationContext message) throws JMSException {
 
-                Boolean lv = (Boolean) left.evaluate(message);
+                Boolean lv = (Boolean)left.evaluate(message);
 
                 // Can we do an AND shortcut??
                 if (lv == null)
@@ -60,7 +60,7 @@
                     return Boolean.FALSE;
                 }
 
-                Boolean rv = (Boolean) right.evaluate(message);
+                Boolean rv = (Boolean)right.evaluate(message);
                 return rv == null ? null : rv;
             }
 
@@ -82,7 +82,7 @@
 
     public boolean matches(MessageEvaluationContext message) throws JMSException {
         Object object = evaluate(message);
-        return object!=null && object==Boolean.TRUE;            
+        return object != null && object == Boolean.TRUE;
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/XalanXPathEvaluator.java Wed Aug  8 17:34:07 2007
@@ -28,9 +28,11 @@
 import org.apache.activemq.command.Message;
 import org.apache.activemq.util.ByteArrayInputStream;
 import org.apache.xpath.CachedXPathAPI;
+
+import org.xml.sax.InputSource;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.traversal.NodeIterator;
-import org.xml.sax.InputSource;
 
 public class XalanXPathEvaluator implements XPathExpression.XPathEvaluator {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java Wed Aug  8 17:34:07 2007
@@ -24,8 +24,8 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
 
-import javax.jms.ConnectionFactory;
 import javax.jms.Queue;
 import javax.jms.Topic;
 import javax.naming.Context;
@@ -33,11 +33,8 @@
 import javax.naming.spi.InitialContextFactory;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.Broker;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * A factory of the ActiveMQ InitialContext which contains

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactory.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,13 @@
  */
 package org.apache.activemq.jndi;
 
-import javax.naming.Context;
-import javax.naming.NamingException;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
 
+import javax.naming.Context;
+import javax.naming.NamingException;
+
 /**
  * This implementation of <CODE>InitialContextFactory</CODE> should be used
  * when ActiveMQ is used as WebSphere Generic JMS Provider. It is proved that it
@@ -30,7 +31,8 @@
  * only if it begins with java.naming or javax.naming prefix. Additionaly
  * provider url for the JMS provider can not contain ',' character that is
  * necessary when the list of nodes is provided. So the role of this class is to
- * transform properties before passing it to <CODE>ActiveMQInitialContextFactory</CODE>.
+ * transform properties before passing it to
+ * <CODE>ActiveMQInitialContextFactory</CODE>.
  * 
  * @author Pawel Tucholski
  */
@@ -53,8 +55,7 @@
      * <li>(java.naming.provider.url,url1;url2)=>java.naming.provider.url,url1,url1)
      * <ul>
      * 
-     * @param environment
-     *            properties for transformation
+     * @param environment properties for transformation
      * @return environment after transformation
      */
     protected Hashtable transformEnvironment(Hashtable environment) {
@@ -64,36 +65,31 @@
         Iterator it = environment.entrySet().iterator();
 
         while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
-            String key = (String) entry.getKey();
-            String value = (String) entry.getValue();
+            Map.Entry entry = (Map.Entry)it.next();
+            String key = (String)entry.getKey();
+            String value = (String)entry.getValue();
 
             if (key.startsWith("java.naming.queue")) {
                 String key1 = key.substring("java.naming.queue.".length());
                 key1 = key1.replace('.', '/');
                 environment1.put("queue." + key1, value);
-            }
-            else if (key.startsWith("java.naming.topic")) {
+            } else if (key.startsWith("java.naming.topic")) {
                 String key1 = key.substring("java.naming.topic.".length());
                 key1 = key1.replace('.', '/');
                 environment1.put("topic." + key1, value);
-            }
-            else if (key.startsWith("java.naming.connectionFactoryNames")) {
+            } else if (key.startsWith("java.naming.connectionFactoryNames")) {
                 String key1 = key.substring("java.naming.".length());
                 environment1.put(key1, value);
-            }
-            else if (key.startsWith("java.naming.connection")) {
+            } else if (key.startsWith("java.naming.connection")) {
                 String key1 = key.substring("java.naming.".length());
                 environment1.put(key1, value);
-            }
-            else if (key.startsWith(Context.PROVIDER_URL)) {
+            } else if (key.startsWith(Context.PROVIDER_URL)) {
                 // websphere administration console does not exept , character
                 // in provider url, so ; must be used
                 // all ; to ,
                 value = value.replace(';', ',');
                 environment1.put(Context.PROVIDER_URL, value);
-            }
-            else {
+            } else {
                 environment1.put(key, value);
             }
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIBaseStorable.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,14 @@
  */
 package org.apache.activemq.jndi;
 
-import javax.naming.NamingException;
-import javax.naming.Reference;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Properties;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
 
 /**
  * Facilitates objects to be stored in JNDI as properties

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIReferenceFactory.java Wed Aug  8 17:34:07 2007
@@ -16,18 +16,19 @@
  */
 package org.apache.activemq.jndi;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
 
-import javax.naming.spi.ObjectFactory;
-import javax.naming.Name;
 import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
 import javax.naming.Reference;
 import javax.naming.StringRefAddr;
-import javax.naming.NamingException;
-import java.util.Hashtable;
-import java.util.Properties;
-import java.util.Enumeration;
+import javax.naming.spi.ObjectFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Converts objects implementing JNDIStorable into a property fields so they can
@@ -40,19 +41,19 @@
     /**
      * This will be called by a JNDIprovider when a Reference is retrieved from
      * a JNDI store - and generates the orignal instance
-     *
-     * @param object      the Reference object
-     * @param name        the JNDI name
-     * @param nameCtx     the context
+     * 
+     * @param object the Reference object
+     * @param name the JNDI name
+     * @param nameCtx the context
      * @param environment the environment settings used by JNDI
      * @return the instance built from the Reference object
-     * @throws Exception if building the instance from Reference fails (usually class
-     *                   not found)
+     * @throws Exception if building the instance from Reference fails (usually
+     *                 class not found)
      */
     public Object getObjectInstance(Object object, Name name, Context nameCtx, Hashtable environment) throws Exception {
         Object result = null;
         if (object instanceof Reference) {
-            Reference reference = (Reference) object;
+            Reference reference = (Reference)object;
 
             if (log.isTraceEnabled()) {
                 log.trace("Getting instance of " + reference.getClassName());
@@ -61,19 +62,18 @@
             Class theClass = loadClass(this, reference.getClassName());
             if (JNDIStorableInterface.class.isAssignableFrom(theClass)) {
 
-                JNDIStorableInterface store = (JNDIStorableInterface) theClass.newInstance();
+                JNDIStorableInterface store = (JNDIStorableInterface)theClass.newInstance();
                 Properties properties = new Properties();
                 for (Enumeration iter = reference.getAll(); iter.hasMoreElements();) {
 
-                    StringRefAddr addr = (StringRefAddr) iter.nextElement();
+                    StringRefAddr addr = (StringRefAddr)iter.nextElement();
                     properties.put(addr.getType(), (addr.getContent() == null) ? "" : addr.getContent());
 
                 }
                 store.setProperties(properties);
                 result = store;
             }
-        }
-        else {
+        } else {
             log.error("Object " + object + " is not a reference - cannot load");
             throw new RuntimeException("Object " + object + " is not a reference");
         }
@@ -82,11 +82,11 @@
 
     /**
      * Create a Reference instance from a JNDIStorable object
-     *
+     * 
      * @param instanceClassName
      * @param po
-     * @return @throws
-     *         NamingException
+     * @return
+     * @throws NamingException
      */
 
     public static Reference createReference(String instanceClassName, JNDIStorableInterface po) throws NamingException {
@@ -97,13 +97,12 @@
         try {
             Properties props = po.getProperties();
             for (Enumeration iter = props.propertyNames(); iter.hasMoreElements();) {
-                String key = (String) iter.nextElement();
+                String key = (String)iter.nextElement();
                 String value = props.getProperty(key);
                 javax.naming.StringRefAddr addr = new javax.naming.StringRefAddr(key, value);
                 result.add(addr);
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             log.error(e.getMessage(), e);
             throw new NamingException(e.getMessage());
         }
@@ -112,11 +111,11 @@
 
     /**
      * Retrieve the class loader for a named class
-     *
+     * 
      * @param thisObj
      * @param className
-     * @return @throws
-     *         ClassNotFoundException
+     * @return
+     * @throws ClassNotFoundException
      */
 
     public static Class loadClass(Object thisObj, String className) throws ClassNotFoundException {
@@ -125,8 +124,7 @@
         Class theClass;
         if (loader != null) {
             theClass = loader.loadClass(className);
-        }
-        else {
+        } else {
             // Will be null in jdk1.1.8
             // use default classLoader
             theClass = Class.forName(className);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/JNDIStorableInterface.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,9 @@
  */
 package org.apache.activemq.jndi;
 
-import javax.naming.Referenceable;
 import java.util.Properties;
+
+import javax.naming.Referenceable;
 
 /**
  * Faciliates objects to be stored in JNDI as properties

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java Wed Aug  8 17:34:07 2007
@@ -21,15 +21,14 @@
 
 /**
  * Allows users to dynamically create items
- *
+ * 
  * @version $Revision: 1.2 $
  */
 public abstract class LazyCreateContext extends ReadOnlyContext {
     public Object lookup(String name) throws NamingException {
         try {
             return super.lookup(name);
-        }
-        catch (NameNotFoundException e) {
+        } catch (NameNotFoundException e) {
             Object answer = createEntry(name);
             if (answer == null) {
                 throw e;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java Wed Aug  8 17:34:07 2007
@@ -17,14 +17,27 @@
 
 package org.apache.activemq.jndi;
 
-import javax.naming.*;
-import javax.naming.spi.NamingManager;
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
+
+import javax.naming.Binding;
+import javax.naming.CompositeName;
+import javax.naming.Context;
+import javax.naming.LinkRef;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.NotContextException;
+import javax.naming.OperationNotSupportedException;
+import javax.naming.Reference;
+import javax.naming.spi.NamingManager;
 
 /**
  * A read-only Context <p/> This version assumes it and all its subcontext are

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/MessageMarshaller.java Wed Aug  8 17:34:07 2007
@@ -22,21 +22,25 @@
 import org.apache.activemq.command.Message;
 import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.wireformat.WireFormat;
+
 /**
  * Implementation of a Marshaller for MessageIds
  * 
  * @version $Revision: 1.2 $
  */
 public class MessageMarshaller implements Marshaller<Message> {
-    
+
     private WireFormat wireFormat;
+
     /**
      * Constructor
+     * 
      * @param wireFormat
      */
     public MessageMarshaller(WireFormat wireFormat) {
-        this.wireFormat=wireFormat;
+        this.wireFormat = wireFormat;
     }
+
     /**
      * Write the payload of this entry to the RawContainer
      * 
@@ -44,7 +48,7 @@
      * @param dataOut
      * @throws IOException
      */
-    public void writePayload(Message message,DataOutput dataOut) throws IOException{
+    public void writePayload(Message message, DataOutput dataOut) throws IOException {
         ByteSequence packet = wireFormat.marshal(message);
         dataOut.writeInt(packet.length);
         dataOut.write(packet.data, packet.offset, packet.length);
@@ -57,9 +61,9 @@
      * @return unmarshalled object
      * @throws IOException
      */
-    public Message readPayload(DataInput dataIn) throws IOException{
-        int size=dataIn.readInt();
-        byte[] data=new byte[size];
+    public Message readPayload(DataInput dataIn) throws IOException {
+        int size = dataIn.readInt();
+        byte[] data = new byte[size];
         dataIn.readFully(data);
         return (Message)wireFormat.unmarshal(new ByteSequence(data));
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreEntry.java Wed Aug  8 17:34:07 2007
@@ -17,11 +17,11 @@
 package org.apache.activemq.kaha;
 
 /**
-*  Entry for Store data
-* 
-* @version $Revision: 1.2 $
-*/
-public interface StoreEntry{
+ * Entry for Store data
+ * 
+ * @version $Revision: 1.2 $
+ */
+public interface StoreEntry {
 
     public abstract StoreLocation getKeyDataItem();
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreFactory.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.kaha;
 
-import java.io.File;
 import java.io.IOException;
+
 import org.apache.activemq.kaha.impl.KahaStore;
 
 /**

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/StoreLocation.java Wed Aug  8 17:34:07 2007
@@ -23,7 +23,7 @@
  * 
  * @version $Revision: 1.2 $
  */
-public interface StoreLocation{
+public interface StoreLocation {
 
     /**
      * @return Returns the size.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/IndexRootContainer.java Wed Aug  8 17:34:07 2007
@@ -20,6 +20,7 @@
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.kaha.ContainerId;
 import org.apache.activemq.kaha.Marshaller;
@@ -31,8 +32,6 @@
 import org.apache.activemq.kaha.impl.index.IndexManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * A container of roots for other Containers

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java Wed Aug  8 17:34:07 2007
@@ -36,7 +36,6 @@
 import org.apache.activemq.kaha.Store;
 import org.apache.activemq.kaha.StoreLocation;
 import org.apache.activemq.kaha.impl.async.AsyncDataManager;
-import org.apache.activemq.kaha.impl.async.ControlFile;
 import org.apache.activemq.kaha.impl.async.DataManagerFacade;
 import org.apache.activemq.kaha.impl.container.ListContainerImpl;
 import org.apache.activemq.kaha.impl.container.MapContainerImpl;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java Wed Aug  8 17:34:07 2007
@@ -104,6 +104,7 @@
         return dataFileId - df.dataFileId;
     }
 
+    @Override
     public boolean equals(Object o) {
         boolean result = false;
         if (o instanceof DataFile) {
@@ -112,4 +113,8 @@
         return result;
     }
 
+    @Override
+    public int hashCode() {
+        return dataFileId;
+    }
 }



Mime
View raw message