activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564057 [8/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/security/LDAPAuthorizationMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/LDAPAuthorizationMap.java Wed Aug  8 17:34:07 2007
@@ -43,7 +43,6 @@
  * An {@link AuthorizationMap} which uses LDAP
  * 
  * @org.apache.xbean.XBean
- * 
  * @author ngcutura
  */
 public class LDAPAuthorizationMap implements AuthorizationMap {
@@ -112,24 +111,24 @@
     }
 
     public LDAPAuthorizationMap(Map options) {
-        initialContextFactory = (String) options.get(INITIAL_CONTEXT_FACTORY);
-        connectionURL = (String) options.get(CONNECTION_URL);
-        connectionUsername = (String) options.get(CONNECTION_USERNAME);
-        connectionPassword = (String) options.get(CONNECTION_PASSWORD);
-        connectionProtocol = (String) options.get(CONNECTION_PROTOCOL);
-        authentication = (String) options.get(AUTHENTICATION);
-
-        adminBase = (String) options.get(ADMIN_BASE);
-        adminAttribute = (String) options.get(ADMIN_ATTRIBUTE);
-        readBase = (String) options.get(READ_BASE);
-        readAttribute = (String) options.get(READ_ATTRIBUTE);
-        writeBase = (String) options.get(WRITE_BASE);
-        writeAttribute = (String) options.get(WRITE_ATTRIBUTE);
-
-        String topicSearchMatching = (String) options.get(TOPIC_SEARCH_MATCHING);
-        String topicSearchSubtree = (String) options.get(TOPIC_SEARCH_SUBTREE);
-        String queueSearchMatching = (String) options.get(QUEUE_SEARCH_MATCHING);
-        String queueSearchSubtree = (String) options.get(QUEUE_SEARCH_SUBTREE);
+        initialContextFactory = (String)options.get(INITIAL_CONTEXT_FACTORY);
+        connectionURL = (String)options.get(CONNECTION_URL);
+        connectionUsername = (String)options.get(CONNECTION_USERNAME);
+        connectionPassword = (String)options.get(CONNECTION_PASSWORD);
+        connectionProtocol = (String)options.get(CONNECTION_PROTOCOL);
+        authentication = (String)options.get(AUTHENTICATION);
+
+        adminBase = (String)options.get(ADMIN_BASE);
+        adminAttribute = (String)options.get(ADMIN_ATTRIBUTE);
+        readBase = (String)options.get(READ_BASE);
+        readAttribute = (String)options.get(READ_ATTRIBUTE);
+        writeBase = (String)options.get(WRITE_BASE);
+        writeAttribute = (String)options.get(WRITE_ATTRIBUTE);
+
+        String topicSearchMatching = (String)options.get(TOPIC_SEARCH_MATCHING);
+        String topicSearchSubtree = (String)options.get(TOPIC_SEARCH_SUBTREE);
+        String queueSearchMatching = (String)options.get(QUEUE_SEARCH_MATCHING);
+        String queueSearchSubtree = (String)options.get(QUEUE_SEARCH_SUBTREE);
         topicSearchMatchingFormat = new MessageFormat(topicSearchMatching);
         queueSearchMatchingFormat = new MessageFormat(queueSearchMatching);
         topicSearchSubtreeBool = Boolean.valueOf(topicSearchSubtree).booleanValue();
@@ -137,21 +136,21 @@
     }
 
     public Set getTempDestinationAdminACLs() {
-        //TODO insert implementation
-    	
+        // TODO insert implementation
+
         return null;
-    }    
-    
+    }
+
     public Set getTempDestinationReadACLs() {
-    	//    	TODO insert implementation
+        // TODO insert implementation
         return null;
     }
-    
+
     public Set getTempDestinationWriteACLs() {
-    	//    	TODO insert implementation
+        // TODO insert implementation
         return null;
-    }      
-    
+    }
+
     public Set getAdminACLs(ActiveMQDestination destination) {
         return getACLs(destination, adminBase, adminAttribute);
     }
@@ -308,8 +307,7 @@
     protected Set getACLs(ActiveMQDestination destination, String roleBase, String roleAttribute) {
         try {
             context = open();
-        }
-        catch (NamingException e) {
+        } catch (NamingException e) {
             log.error(e);
             return new HashSet();
         }
@@ -323,32 +321,30 @@
         SearchControls constraints = new SearchControls();
 
         if ((destination.getDestinationType() & ActiveMQDestination.QUEUE_TYPE) == ActiveMQDestination.QUEUE_TYPE) {
-            destinationBase = queueSearchMatchingFormat.format(new String[] { destination.getPhysicalName() });
+            destinationBase = queueSearchMatchingFormat.format(new String[] {destination.getPhysicalName()});
             if (queueSearchSubtreeBool) {
                 constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-            }
-            else {
+            } else {
                 constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
             }
         }
         if ((destination.getDestinationType() & ActiveMQDestination.TOPIC_TYPE) == ActiveMQDestination.TOPIC_TYPE) {
-            destinationBase = topicSearchMatchingFormat.format(new String[] { destination.getPhysicalName() });
+            destinationBase = topicSearchMatchingFormat.format(new String[] {destination.getPhysicalName()});
             if (topicSearchSubtreeBool) {
                 constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-            }
-            else {
+            } else {
                 constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
             }
         }
 
-        constraints.setReturningAttributes(new String[] { roleAttribute });
+        constraints.setReturningAttributes(new String[] {roleAttribute});
 
         try {
             Set roles = new HashSet();
             Set acls = new HashSet();
             NamingEnumeration results = context.search(destinationBase, roleBase, constraints);
             while (results.hasMore()) {
-                SearchResult result = (SearchResult) results.next();
+                SearchResult result = (SearchResult)results.next();
                 Attributes attrs = result.getAttributes();
                 if (attrs == null) {
                     continue;
@@ -356,12 +352,11 @@
                 acls = addAttributeValues(roleAttribute, attrs, acls);
             }
             for (Iterator iter = acls.iterator(); iter.hasNext();) {
-                String roleName = (String) iter.next();
+                String roleName = (String)iter.next();
                 roles.add(new GroupPrincipal(roleName));
             }
             return roles;
-        }
-        catch (NamingException e) {
+        } catch (NamingException e) {
             log.error(e);
             return new HashSet();
         }
@@ -376,11 +371,11 @@
         }
         Attribute attr = attrs.get(attrId);
         if (attr == null) {
-            return (values);
+            return values;
         }
         NamingEnumeration e = attr.getAll();
         while (e.hasMore()) {
-            String value = (String) e.next();
+            String value = (String)e.next();
             values.add(value);
         }
         return values;
@@ -405,8 +400,7 @@
             env.put(Context.SECURITY_AUTHENTICATION, authentication);
             context = new InitialDirContext(env);
 
-        }
-        catch (NamingException e) {
+        } catch (NamingException e) {
             log.error(e);
             throw e;
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SecurityContext.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.security;
 
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.Collections;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java Wed Aug  8 17:34:07 2007
@@ -19,13 +19,12 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerFilter;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ConnectionInfo;
-
-import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
  * Handles authenticating a users against a simple user name/password map.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java Wed Aug  8 17:34:07 2007
@@ -24,12 +24,9 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import org.apache.activemq.jaas.GroupPrincipal;
-
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerPlugin;
-
-import java.util.Map;
+import org.apache.activemq.jaas.GroupPrincipal;
 
 /**
  * A simple authentication plugin

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationMap.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.security;
 
+import java.util.Set;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.filter.DestinationMap;
-
-import java.util.Set;
 
 /**
  * An AuthorizationMap which is configured with individual DestinationMaps for

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java Wed Aug  8 17:34:07 2007
@@ -16,29 +16,20 @@
  */
 package org.apache.activemq.security;
 
-import org.apache.activemq.filter.DestinationMapEntry;
-import org.apache.activemq.jaas.GroupPrincipal;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
 /**
  * Represents an entry in a {@link DefaultAuthorizationMap} for assigning
- * different operations (read, write, admin) of user roles to
- * a temporary destination
+ * different operations (read, write, admin) of user roles to a temporary
+ * destination
  * 
  * @org.apache.xbean.XBean
- * 
  * @version $Revision: 426366 $
  */
 public class TempDestinationAuthorizationEntry extends AuthorizationEntry {
 
-  
     public void afterPropertiesSet() throws Exception {
-       //we don't need to check if destination is specified since
-       //the TempDestinationAuthorizationEntry  should map to all temp destinations	
-    }    
+        // we don't need to check if destination is specified since
+        // the TempDestinationAuthorizationEntry should map to all temp
+        // destinations
+    }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/SessionState.java Wed Aug  8 17:34:07 2007
@@ -19,15 +19,14 @@
 
 import java.util.Collection;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.command.ConsumerId;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.command.ProducerId;
 import org.apache.activemq.command.ProducerInfo;
 import org.apache.activemq.command.SessionInfo;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 public class SessionState {
     final SessionInfo info;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/PersistenceAdapter.java Wed Aug  8 17:34:07 2007
@@ -16,16 +16,16 @@
  */
 package org.apache.activemq.store;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.memory.UsageManager;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Set;
 
 /**
  * Adapter to the actual persistence mechanism used with ActiveMQ

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java Wed Aug  8 17:34:07 2007
@@ -23,7 +23,6 @@
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.activeio.journal.Journal;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerServiceAware;
 import org.apache.activemq.broker.ConnectionContext;
@@ -182,7 +181,7 @@
         // store, but they still
         // need to be recovered when the broker starts up.
 
-        if (referenceStoreAdapter.isStoreValid() == false) {
+        if (!referenceStoreAdapter.isStoreValid()) {
             log.warn("The ReferenceStore is not valid - recovering ...");
             recover();
             log.info("Finished recovering the ReferenceStore");
@@ -514,6 +513,8 @@
                         case JournalTransaction.XA_ROLLBACK:
                             transactionStore.replayRollback(command.getTransactionId());
                             break;
+                        default:
+                            throw new IOException("Invalid journal command type: " + command.getType());
                         }
                     } catch (IOException e) {
                         log.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
@@ -558,7 +559,7 @@
      * @throws IOException
      */
     public Location writeCommand(DataStructure command, boolean syncHint) throws IOException {
-        return asyncDataManager.write(wireFormat.marshal(command), (syncHint && syncOnWrite));
+        return asyncDataManager.write(wireFormat.marshal(command), syncHint && syncOnWrite);
     }
 
     private Location writeTraceMessage(String message, boolean sync) throws IOException {
@@ -568,8 +569,8 @@
     }
 
     public void onMemoryUseChanged(UsageManager memoryManager, int oldPercentUsage, int newPercentUsage) {
-        newPercentUsage = ((newPercentUsage) / 10) * 10;
-        oldPercentUsage = ((oldPercentUsage) / 10) * 10;
+        newPercentUsage = (newPercentUsage / 10) * 10;
+        oldPercentUsage = (oldPercentUsage / 10) * 10;
         if (newPercentUsage >= 70 && oldPercentUsage < newPercentUsage) {
             checkpoint(false);
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQTransactionStore.java Wed Aug  8 17:34:07 2007
@@ -22,8 +22,6 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import javax.transaction.xa.XAException;
-
 import org.apache.activemq.command.JournalTopicAck;
 import org.apache.activemq.command.JournalTransaction;
 import org.apache.activemq.command.Message;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DataSourceSupport.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.store.jdbc;
 
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.apache.activemq.util.IOHelper;
+import java.io.File;
+import java.io.IOException;
 
 import javax.sql.DataSource;
 
-import java.io.File;
-import java.io.IOException;
+import org.apache.activemq.util.IOHelper;
+import org.apache.derby.jdbc.EmbeddedDataSource;
 
 /**
  * A helper class which provides a factory method to create a default

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java Wed Aug  8 17:34:07 2007
@@ -16,18 +16,19 @@
  */
 package org.apache.activemq.store.jdbc;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.sql.DataSource;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
+import javax.sql.DataSource;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
- * Represents an exclusive lock on a database to avoid multiple brokers
- * running against the same logical database.
- *
+ * Represents an exclusive lock on a database to avoid multiple brokers running
+ * against the same logical database.
+ * 
  * @version $Revision: $
  */
 public class DefaultDatabaseLocker implements DatabaseLocker {
@@ -57,8 +58,7 @@
                 statement = connection.prepareStatement(sql);
                 statement.execute();
                 break;
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 if (stopping) {
                     throw new Exception("Cannot start broker as being asked to shut down. Interrupted attempt to acquire lock: " + e, e);
                 }
@@ -66,8 +66,7 @@
                 if (null != statement) {
                     try {
                         statement.close();
-                    }
-                    catch (SQLException e1) {
+                    } catch (SQLException e1) {
                         log.warn("Caught while closing statement: " + e1, e1);
                     }
                     statement = null;
@@ -75,8 +74,7 @@
                 if (null != connection) {
                     try {
                         connection.close();
-                    }
-                    catch (SQLException e1) {
+                    } catch (SQLException e1) {
                         log.warn("Caught while closing connection: " + e1, e1);
                     }
                     connection = null;
@@ -106,8 +104,7 @@
             if (rows == 1) {
                 return true;
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             log.error("Failed to update database lock: " + e, e);
         }
         return false;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,18 @@
  */
 package org.apache.activemq.store.jdbc;
 
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 
+import javax.sql.DataSource;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerServiceAware;
 import org.apache.activemq.broker.ConnectionContext;
@@ -39,14 +46,6 @@
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.sql.DataSource;
-
-import java.io.File;
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.Collections;
-import java.util.Set;
 
 /**
  * A {@link PersistenceAdapter} implementation using JDBC for persistence

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java Wed Aug  8 17:34:07 2007
@@ -71,25 +71,23 @@
     public String[] getCreateSchemaStatements() {
         if (createSchemaStatements == null) {
             createSchemaStatements = new String[] {
-                    "CREATE TABLE " + getFullMessageTableName() + "(" + "ID " + sequenceDataType + " NOT NULL"
-                            + ", CONTAINER " + containerNameDataType + ", MSGID_PROD " + msgIdDataType + ", MSGID_SEQ "
-                            + sequenceDataType + ", EXPIRATION " + longDataType + ", MSG "
-                            + (useExternalMessageReferences ? stringIdDataType : binaryDataType)
-                            + ", PRIMARY KEY ( ID ) )",
-                    "CREATE INDEX " + getFullMessageTableName() + "_MIDX ON " + getFullMessageTableName()
-                            + " (MSGID_PROD,MSGID_SEQ)",
-                    "CREATE INDEX " + getFullMessageTableName() + "_CIDX ON " + getFullMessageTableName()
-                            + " (CONTAINER)",
-                    "CREATE INDEX " + getFullMessageTableName() + "_EIDX ON " + getFullMessageTableName()
-                            + " (EXPIRATION)",
-                    "CREATE TABLE " + getFullAckTableName() + "(" + "CONTAINER " + containerNameDataType + " NOT NULL"
-                            + ", SUB_DEST " + stringIdDataType 
-                            + ", CLIENT_ID " + stringIdDataType + " NOT NULL" + ", SUB_NAME " + stringIdDataType
-                            + " NOT NULL" + ", SELECTOR " + stringIdDataType + ", LAST_ACKED_ID " + sequenceDataType
-                            + ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))", 
-                    "CREATE TABLE " + getFullLockTableName() + "( ID " + longDataType + " NOT NULL, TIME " + longDataType 
-                            + ", BROKER_NAME " + stringIdDataType + ", PRIMARY KEY (ID) )",
-                    "INSERT INTO " + getFullLockTableName() + "(ID) VALUES (1)", 
+                "CREATE TABLE " + getFullMessageTableName() + "(" + "ID " + sequenceDataType + " NOT NULL"
+                    + ", CONTAINER " + containerNameDataType + ", MSGID_PROD " + msgIdDataType + ", MSGID_SEQ "
+                    + sequenceDataType + ", EXPIRATION " + longDataType + ", MSG "
+                    + (useExternalMessageReferences ? stringIdDataType : binaryDataType)
+                    + ", PRIMARY KEY ( ID ) )",
+                "CREATE INDEX " + getFullMessageTableName() + "_MIDX ON " + getFullMessageTableName() + " (MSGID_PROD,MSGID_SEQ)",
+                "CREATE INDEX " + getFullMessageTableName() + "_CIDX ON " + getFullMessageTableName() + " (CONTAINER)",
+                "CREATE INDEX " + getFullMessageTableName() + "_EIDX ON " + getFullMessageTableName() + " (EXPIRATION)",
+                "CREATE TABLE " + getFullAckTableName() + "(" + "CONTAINER " + containerNameDataType + " NOT NULL"
+                    + ", SUB_DEST " + stringIdDataType 
+                    + ", CLIENT_ID " + stringIdDataType + " NOT NULL" + ", SUB_NAME " + stringIdDataType
+                    + " NOT NULL" + ", SELECTOR " + stringIdDataType + ", LAST_ACKED_ID " + sequenceDataType
+                    + ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))", 
+                "CREATE TABLE " + getFullLockTableName() 
+                    + "( ID " + longDataType + " NOT NULL, TIME " + longDataType 
+                    + ", BROKER_NAME " + stringIdDataType + ", PRIMARY KEY (ID) )",
+                "INSERT INTO " + getFullLockTableName() + "(ID) VALUES (1)", 
             };
         }
         return createSchemaStatements;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/AxionJDBCAdapter.java Wed Aug  8 17:34:07 2007
@@ -32,30 +32,29 @@
 
     public void setStatements(Statements statements) {
         
-        statements.setCreateSchemaStatements(
-                new String[]{
-                        "CREATE TABLE "+statements.getFullMessageTableName()+"("
-                               +"ID "+statements.getSequenceDataType()+" NOT NULL"
-                               +", CONTAINER "+statements.getContainerNameDataType()
-                               +", MSGID_PROD "+statements.getMsgIdDataType()
-                               +", MSGID_SEQ "+statements.getSequenceDataType()
-                               +", EXPIRATION "+statements.getLongDataType()
-                               +", MSG "+(statements.isUseExternalMessageReferences() ? statements.getStringIdDataType() : statements.getBinaryDataType())
-                               +", PRIMARY KEY ( ID ) )",                          
-                         "CREATE INDEX "+statements.getFullMessageTableName()+"_MIDX ON "+statements.getFullMessageTableName()+" (MSGID_PROD,MSGID_SEQ)",
-                         "CREATE INDEX "+statements.getFullMessageTableName()+"_CIDX ON "+statements.getFullMessageTableName()+" (CONTAINER)",                                       
-                         "CREATE INDEX "+statements.getFullMessageTableName()+"_EIDX ON "+statements.getFullMessageTableName()+" (EXPIRATION)",                 
-                         "CREATE TABLE "+statements.getFullAckTableName()+"("
-                               +"CONTAINER "+statements.getContainerNameDataType()+" NOT NULL"
-                               +", SUB_DEST " + statements.getContainerNameDataType()
-                               +", CLIENT_ID "+statements.getStringIdDataType()+" NOT NULL"
-                               +", SUB_NAME "+statements.getStringIdDataType()+" NOT NULL"
-                               +", SELECTOR "+statements.getStringIdDataType()
-                               +", LAST_ACKED_ID "+statements.getSequenceDataType()
-                               +", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))",
-                    }
-        );
-        statements.setDeleteOldMessagesStatement("DELETE FROM "+statements.getFullMessageTableName()+ " WHERE ( EXPIRATION<>0 AND EXPIRATION<?)");
+        String[] createStatements = new String[]{
+            "CREATE TABLE " + statements.getFullMessageTableName() + "("
+                + "ID " + statements.getSequenceDataType() + " NOT NULL"
+                + ", CONTAINER " + statements.getContainerNameDataType()
+                + ", MSGID_PROD " + statements.getMsgIdDataType()
+                + ", MSGID_SEQ " + statements.getSequenceDataType()
+                + ", EXPIRATION " + statements.getLongDataType()
+                + ", MSG " + (statements.isUseExternalMessageReferences() ? statements.getStringIdDataType() : statements.getBinaryDataType())
+                + ", PRIMARY KEY ( ID ) )",                          
+            "CREATE INDEX " + statements.getFullMessageTableName() + "_MIDX ON " + statements.getFullMessageTableName() + " (MSGID_PROD,MSGID_SEQ)",
+            "CREATE INDEX " + statements.getFullMessageTableName() + "_CIDX ON " + statements.getFullMessageTableName() + " (CONTAINER)",                                       
+            "CREATE INDEX " + statements.getFullMessageTableName() + "_EIDX ON " + statements.getFullMessageTableName() + " (EXPIRATION)",                 
+            "CREATE TABLE " + statements.getFullAckTableName() + "("
+                + "CONTAINER " + statements.getContainerNameDataType() + " NOT NULL"
+                + ", SUB_DEST " + statements.getContainerNameDataType()
+                + ", CLIENT_ID " + statements.getStringIdDataType() + " NOT NULL"
+                + ", SUB_NAME " + statements.getStringIdDataType() + " NOT NULL"
+                + ", SELECTOR " + statements.getStringIdDataType()
+                + ", LAST_ACKED_ID " + statements.getSequenceDataType()
+                + ", PRIMARY KEY ( CONTAINER, CLIENT_ID, SUB_NAME))"
+            };
+        statements.setCreateSchemaStatements(createStatements);
+        statements.setDeleteOldMessagesStatement("DELETE FROM " + statements.getFullMessageTableName() + " WHERE ( EXPIRATION<>0 AND EXPIRATION<?)");
         statements.setLongDataType("LONG");
         
         super.setStatements(statements);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.store.jdbc.adapter;
 
-import org.apache.activemq.store.jdbc.Statements;
-
 import java.sql.Blob;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+
+import org.apache.activemq.store.jdbc.Statements;
 
 /**
  * @version $Revision: 1.2 $

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java Wed Aug  8 17:34:07 2007
@@ -543,6 +543,8 @@
                         case JournalTransaction.XA_ROLLBACK:
                             transactionStore.replayRollback(command.getTransactionId());
                             break;
+                        default:
+                            throw new IOException("Invalid journal command type: " + command.getType());
                         }
                     } catch (IOException e) {
                         log.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
@@ -600,8 +602,8 @@
     }
 
     public void onMemoryUseChanged(UsageManager memoryManager, int oldPercentUsage, int newPercentUsage) {
-        newPercentUsage = ((newPercentUsage) / 10) * 10;
-        oldPercentUsage = ((oldPercentUsage) / 10) * 10;
+        newPercentUsage = (newPercentUsage / 10) * 10;
+        oldPercentUsage = (oldPercentUsage / 10) * 10;
         if (newPercentUsage >= 70 && oldPercentUsage < newPercentUsage) {
             boolean sync = newPercentUsage >= 90;
             checkpoint(sync, true);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java Wed Aug  8 17:34:07 2007
@@ -18,12 +18,12 @@
 
 import java.io.File;
 import java.io.IOException;
+
 import org.apache.activeio.journal.Journal;
 import org.apache.activeio.journal.active.JournalImpl;
 import org.apache.activeio.journal.active.JournalLockedException;
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.store.PersistenceAdapterFactory;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
 import org.apache.activemq.store.jdbc.DataSourceSupport;
 import org.apache.activemq.store.jdbc.JDBCAdapter;
 import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java Wed Aug  8 17:34:07 2007
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 
 import javax.transaction.xa.XAException;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/AtomicIntegerMarshaller.java Wed Aug  8 17:34:07 2007
@@ -19,8 +19,9 @@
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
-import org.apache.activemq.kaha.Marshaller;
 import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.activemq.kaha.Marshaller;
 
 /**
  * Marshall an AtomicInteger

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.store.kahadaptor;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
-import java.util.Map.Entry;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
@@ -32,7 +32,6 @@
 import org.apache.activemq.command.SubscriptionInfo;
 import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.kaha.CommandMarshaller;
-import org.apache.activemq.kaha.ContainerId;
 import org.apache.activemq.kaha.ListContainer;
 import org.apache.activemq.kaha.MapContainer;
 import org.apache.activemq.kaha.MessageIdMarshaller;
@@ -46,7 +45,6 @@
 import org.apache.activemq.store.amq.AMQTx;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.codehaus.groovy.antlr.treewalker.PreOrderTraversal;
 
 public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements ReferenceStoreAdapter {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java Wed Aug  8 17:34:07 2007
@@ -19,10 +19,10 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.activemq.command.BaseCommand;
 import org.apache.activemq.command.Message;
 import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.store.MessageStore;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java Wed Aug  8 17:34:07 2007
@@ -20,7 +20,10 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+
 import javax.transaction.xa.XAException;
+
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.Message;
 import org.apache.activemq.command.MessageAck;
@@ -32,7 +35,6 @@
 import org.apache.activemq.store.TopicMessageStore;
 import org.apache.activemq.store.TransactionRecoveryListener;
 import org.apache.activemq.store.TransactionStore;
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Provides a TransactionStore implementation that can create transaction aware

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java Wed Aug  8 17:34:07 2007
@@ -13,11 +13,11 @@
  */
 package org.apache.activemq.store.kahadaptor;
 
+import java.util.Iterator;
+
 import org.apache.activemq.command.MessageId;
 import org.apache.activemq.kaha.ListContainer;
 import org.apache.activemq.kaha.StoreEntry;
-
-import java.util.Iterator;
 
 /**
  * Holds information for the subscriber

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java Wed Aug  8 17:34:07 2007
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -32,8 +33,6 @@
 import org.apache.activemq.store.TransactionStore;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * @org.apache.xbean.XBean

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java Wed Aug  8 17:34:07 2007
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.transaction.xa.XAException;
 
@@ -33,8 +34,6 @@
 import org.apache.activemq.store.TopicMessageStore;
 import org.apache.activemq.store.TransactionRecoveryListener;
 import org.apache.activemq.store.TransactionStore;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Provides a TransactionStore implementation that can create transaction aware

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java Wed Aug  8 17:34:07 2007
@@ -87,7 +87,7 @@
             // shutDown() being called, which would wait forever
             // waiting for iterating to finish
             if (runningThread != Thread.currentThread()) {
-                if (iterating == true) {
+                if (iterating) {
                     runable.wait(timeout);
                 }
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java Wed Aug  8 17:34:07 2007
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.thread;
 
-import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadFactory;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java Wed Aug  8 17:34:07 2007
@@ -31,9 +31,9 @@
  * @version $Revision: 1.3 $
  */
 public class LocalTransaction extends Transaction {
-    
+
     private static final Log log = LogFactory.getLog(LocalTransaction.class);
-    
+
     private final TransactionStore transactionStore;
     private final LocalTransactionId xid;
     private final ConnectionContext context;
@@ -48,11 +48,9 @@
         // Get ready for commit.
         try {
             prePrepare();
-        }
-        catch (XAException e) {
+        } catch (XAException e) {
             throw e;
-        }
-        catch (Throwable e) {
+        } catch (Throwable e) {
             log.warn("COMMIT FAILED: ", e);
             rollback();
             // Let them know we rolled back.
@@ -65,12 +63,11 @@
         setState(Transaction.FINISHED_STATE);
         context.getTransactions().remove(xid);
         transactionStore.commit(getTransactionId(), false);
-        
+
         try {
             fireAfterCommit();
-        }
-        catch (Throwable e) {
-            // I guess this could happen.  Post commit task failed
+        } catch (Throwable e) {
+            // I guess this could happen. Post commit task failed
             // to execute properly.
             log.warn("POST COMMIT FAILED: ", e);
             XAException xae = new XAException("POST COMMIT FAILED");
@@ -88,8 +85,7 @@
 
         try {
             fireAfterRollback();
-        }
-        catch (Throwable e) {
+        } catch (Throwable e) {
             log.warn("POST ROLLBACK FAILED: ", e);
             XAException xae = new XAException("POST ROLLBACK FAILED");
             xae.errorCode = XAException.XAER_RMERR;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java Wed Aug  8 17:34:07 2007
@@ -140,6 +140,8 @@
             transactionStore.rollback(getTransactionId());
             doPostRollback();
             break;
+        default:
+            throw new XAException("Invalid state");
         }
 
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java Wed Aug  8 17:34:07 2007
@@ -46,15 +46,14 @@
     }
 
     public void onCommand(Object o) {
-    	Command command = (Command) o;
+        Command command = (Command)o;
         byte type = command.getDataStructureType();
         if (type == PartialCommand.DATA_STRUCTURE_TYPE || type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
-            PartialCommand header = (PartialCommand) command;
+            PartialCommand header = (PartialCommand)command;
             byte[] partialData = header.getData();
             try {
                 out.write(partialData);
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                 getTransportListener().onException(e);
             }
             if (type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
@@ -62,20 +61,18 @@
                     byte[] fullData = out.toByteArray();
                     out.reset();
                     DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(fullData));
-                    Command completeCommand = (Command) wireFormat.unmarshal(dataIn);
+                    Command completeCommand = (Command)wireFormat.unmarshal(dataIn);
 
-                    LastPartialCommand lastCommand = (LastPartialCommand) command;
+                    LastPartialCommand lastCommand = (LastPartialCommand)command;
                     lastCommand.configure(completeCommand);
 
                     getTransportListener().onCommand(completeCommand);
-                }
-                catch (IOException e) {
+                } catch (IOException e) {
                     log.warn("Failed to unmarshal partial command: " + command);
                     getTransportListener().onException(e);
                 }
             }
-        }
-        else {
+        } else {
             getTransportListener().onCommand(command);
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java Wed Aug  8 17:34:07 2007
@@ -18,40 +18,39 @@
 
 import java.io.IOException;
 
-
 /**
  * An asynchronous listener of commands
- *
+ * 
  * @version $Revision$
  */
 public class DefaultTransportListener implements TransportListener {
-    
+
     /**
      * called to process a command
+     * 
      * @param command
      */
-    public void onCommand(Object command){
+    public void onCommand(Object command) {
     }
+
     /**
      * An unrecoverable exception has occured on the transport
+     * 
      * @param error
      */
-    public void onException(IOException error){
+    public void onException(IOException error) {
     }
-    
+
     /**
      * The transport has suffered an interuption from which it hopes to recover
-     *
      */
-    public void transportInterupted(){
+    public void transportInterupted() {
     }
-    
-    
+
     /**
      * The transport has resumed after an interuption
-     *
      */
-    public void transportResumed(){
+    public void transportResumed() {
     }
-    
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java Wed Aug  8 17:34:07 2007
@@ -18,13 +18,12 @@
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.command.Response;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.TimeUnit;
 
 public class FutureResponse {
     private static final Log log = LogFactory.getLog(FutureResponse.class);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.transport;
 
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import org.apache.activemq.command.KeepAliveInfo;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.thread.Scheduler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * Used to make sure that commands are arriving periodically from the peer of

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java Wed Aug  8 17:34:07 2007
@@ -17,7 +17,6 @@
 package org.apache.activemq.transport;
 
 import java.io.IOException;
-import org.apache.activemq.command.ShutdownInfo;
 
 /**
  * @version $Revision$

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java Wed Aug  8 17:34:07 2007
@@ -19,13 +19,13 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ExceptionResponse;
 import org.apache.activemq.command.Response;
 import org.apache.activemq.util.IntSequenceGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Adds the incrementing sequence number to commands along with performing the

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java Wed Aug  8 17:34:07 2007
@@ -23,6 +23,8 @@
 import java.net.UnknownHostException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executor;
 
 import org.apache.activemq.util.FactoryFinder;
 import org.apache.activemq.util.IOExceptionSupport;
@@ -30,9 +32,6 @@
 import org.apache.activemq.util.URISupport;
 import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.wireformat.WireFormatFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
 
 public abstract class TransportFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServer.java Wed Aug  8 17:34:07 2007
@@ -22,25 +22,25 @@
 import org.apache.activemq.Service;
 import org.apache.activemq.command.BrokerInfo;
 
-
 /**
- * A TransportServer asynchronously accepts {@see Transport} objects
- * and then delivers those objects to a {@see TransportAcceptListener}.
+ * A TransportServer asynchronously accepts {@see Transport} objects and then
+ * delivers those objects to a {@see TransportAcceptListener}.
  * 
  * @version $Revision: 1.4 $
  */
 public interface TransportServer extends Service {
-	
-	/**
-	 * Registers an {@see TransportAcceptListener} which is notified of accepted channels.
-	 *  
-	 * @param acceptListener
-	 */
+
+    /**
+     * Registers an {@see TransportAcceptListener} which is notified of accepted
+     * channels.
+     * 
+     * @param acceptListener
+     */
     public void setAcceptListener(TransportAcceptListener acceptListener);
-    
+
     /**
-     * Associates a broker info with the transport server so that the transport can do
-     * discovery advertisements of the broker.
+     * Associates a broker info with the transport server so that the transport
+     * can do discovery advertisements of the broker.
      * 
      * @param brokerInfo
      */
@@ -48,11 +48,11 @@
 
     public URI getConnectURI();
 
-    
     /**
-     * @return The socket address that this transport is accepting connections on or null if 
-     * this does not or is not currently accepting connections on a socket.
+     * @return The socket address that this transport is accepting connections
+     *         on or null if this does not or is not currently accepting
+     *         connections on a socket.
      */
     public InetSocketAddress getSocketAddress();
-    
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.transport;
 
+import java.net.URI;
+
 import org.apache.activemq.ThreadPriorities;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.net.URI;
 
 /**
  * A useful base class for implementations of {@link TransportServer} which uses

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java Wed Aug  8 17:34:07 2007
@@ -18,7 +18,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.MessageDispatch;
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java Wed Aug  8 17:34:07 2007
@@ -18,6 +18,9 @@
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.WireFormatInfo;
@@ -25,10 +28,6 @@
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * Negotiates the wire format with a new connection

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryAgentFactory.java Wed Aug  8 17:34:07 2007
@@ -18,11 +18,10 @@
 
 import java.io.IOException;
 import java.net.URI;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.util.FactoryFinder;
 import org.apache.activemq.util.IOExceptionSupport;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 public abstract class DiscoveryAgentFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransport.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.transport.discovery;
 
-import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.activemq.command.DiscoveryEvent;
 import org.apache.activemq.transport.CompositeTransport;
@@ -26,8 +26,6 @@
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * A {@link ReliableTransportChannel} which uses a {@link DiscoveryAgent} to

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java Wed Aug  8 17:34:07 2007
@@ -26,13 +26,6 @@
 import java.net.URI;
 import java.util.Iterator;
 import java.util.Map;
-
-import org.apache.activemq.command.DiscoveryEvent;
-import org.apache.activemq.transport.discovery.DiscoveryAgent;
-import org.apache.activemq.transport.discovery.DiscoveryListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -40,7 +33,12 @@
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.activemq.command.DiscoveryEvent;
+import org.apache.activemq.transport.discovery.DiscoveryAgent;
+import org.apache.activemq.transport.discovery.DiscoveryListener;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A {@link DiscoveryAgent} using a multicast address and heartbeat packets
@@ -426,7 +424,7 @@
             if (data == null) {
                 data = new RemoteBrokerData(brokerName, service);
                 brokersByService.put(service, data);
-                ;
+
                 fireServiceAddEvent(data);
                 doAdvertizeSelf();
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgentFactory.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.transport.discovery.multicast;
 
+import java.io.IOException;
+import java.net.URI;
+import java.util.Map;
+
 import org.apache.activemq.transport.discovery.DiscoveryAgent;
 import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
 
 public class MulticastDiscoveryAgentFactory extends DiscoveryAgentFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/JmDNSFactory.java Wed Aug  8 17:34:07 2007
@@ -20,8 +20,9 @@
 import java.net.InetAddress;
 import java.util.HashMap;
 import java.util.Map;
-import javax.jmdns.JmDNS;
 import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.jmdns.JmDNS;
 
 public class JmDNSFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/rendezvous/RendezvousDiscoveryAgent.java Wed Aug  8 17:34:07 2007
@@ -22,6 +22,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import javax.jmdns.JmDNS;
 import javax.jmdns.ServiceEvent;
@@ -35,8 +36,6 @@
 import org.apache.activemq.util.MapHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
  * A {@link DiscoveryAgent} using <a href="http://www.zeroconf.org/">Zeroconf</a>

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/simple/SimpleDiscoveryAgent.java Wed Aug  8 17:34:07 2007
@@ -18,12 +18,11 @@
 
 import java.io.IOException;
 import java.net.URI;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.command.DiscoveryEvent;
 import org.apache.activemq.transport.discovery.DiscoveryAgent;
 import org.apache.activemq.transport.discovery.DiscoveryListener;
-
-import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * A simple DiscoveryAgent that allows static configuration of the discovered

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java Wed Aug  8 17:34:07 2007
@@ -22,6 +22,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Random;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
@@ -41,9 +43,6 @@
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
  * A Transport that is made reliable by being able to fail over to another

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java Wed Aug  8 17:34:07 2007
@@ -21,6 +21,8 @@
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ConsumerInfo;
@@ -42,9 +44,6 @@
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * A Transport that fans out a connection to multiple brokers.

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastDatagramHeaderMarshaller.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.transport.multicast;
 
+import java.net.SocketAddress;
+import java.nio.ByteBuffer;
+
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.Endpoint;
 import org.apache.activemq.transport.udp.DatagramEndpoint;
 import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransport.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,6 @@
  */
 package org.apache.activemq.transport.multicast;
 
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.CommandChannel;
-import org.apache.activemq.transport.udp.CommandDatagramSocket;
-import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
-import org.apache.activemq.transport.udp.UdpTransport;
-import org.apache.activemq.util.ServiceStopper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.IOException;
 import java.net.DatagramSocket;
 import java.net.InetAddress;
@@ -35,6 +26,15 @@
 import java.net.URI;
 import java.net.UnknownHostException;
 
+import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.transport.udp.CommandChannel;
+import org.apache.activemq.transport.udp.CommandDatagramSocket;
+import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
+import org.apache.activemq.transport.udp.UdpTransport;
+import org.apache.activemq.util.ServiceStopper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * A multicast based transport.
  * 
@@ -97,8 +97,7 @@
         if (socket != null) {
             try {
                 socket.leaveGroup(getMulticastAddress());
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                 stopper.onException(this, e);
             }
             socket.close();
@@ -112,10 +111,9 @@
 
         log.debug("Joining multicast address: " + getMulticastAddress());
         socket.joinGroup(getMulticastAddress());
-        socket.setSoTimeout((int) keepAliveInterval);
+        socket.setSoTimeout((int)keepAliveInterval);
 
-        return new CommandDatagramSocket(this, getWireFormat(), getDatagramSize(), getTargetAddress(),
-                createDatagramHeaderMarshaller(), getSocket());
+        return new CommandDatagramSocket(this, getWireFormat(), getDatagramSize(), getTargetAddress(), createDatagramHeaderMarshaller(), getSocket());
     }
 
     protected InetAddress getMulticastAddress() {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransport.java Wed Aug  8 17:34:07 2007
@@ -29,12 +29,12 @@
 
 import javax.net.SocketFactory;
 
-import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.tcp.TcpTransport;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.ServiceStopper;
+import org.apache.activemq.wireformat.WireFormat;
 
 /**
  * An implementation of the {@link Transport} interface using raw tcp/ip

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOTransportFactory.java Wed Aug  8 17:34:07 2007
@@ -30,11 +30,11 @@
 import javax.net.ServerSocketFactory;
 import javax.net.SocketFactory;
 
-import org.apache.activemq.wireformat.WireFormat;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.tcp.TcpTransport;
 import org.apache.activemq.transport.tcp.TcpTransportFactory;
 import org.apache.activemq.transport.tcp.TcpTransportServer;
+import org.apache.activemq.wireformat.WireFormat;
 
 public class NIOTransportFactory extends TcpTransportFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java Wed Aug  8 17:34:07 2007
@@ -23,49 +23,47 @@
 import org.apache.activemq.transport.nio.SelectorManager.Listener;
 
 /**
- * 
  * @author chirino
  */
 final public class SelectorSelection {
 
-	private final SelectorWorker worker;
-	private final SelectionKey key;
-	private final Listener listener;
-	private int interest;
-
-
-	public SelectorSelection(SelectorWorker worker, SocketChannel socketChannel, Listener listener) throws ClosedChannelException {
-		this.worker = worker;
-		this.listener = listener;
-		this.key = socketChannel.register(worker.selector, 0, this);
-		worker.incrementUseCounter();
-	}
-
-	public void setInterestOps(int ops) {
-		interest = ops;
-	}
-
-	public void enable() {
-		key.interestOps(interest);				
-		worker.selector.wakeup();
-	}
-
-	public void disable() {
-		key.interestOps(0);
-	}
-
-	public void close() {
-		worker.decrementUseCounter();
-		key.cancel();
-		worker.selector.wakeup();
-	}
-
-	public void onSelect() {
-		listener.onSelect(this);
-	}
-
-	public void onError(Throwable e) {
-		listener.onError(this, e);
-	}
+    private final SelectorWorker worker;
+    private final SelectionKey key;
+    private final Listener listener;
+    private int interest;
+
+    public SelectorSelection(SelectorWorker worker, SocketChannel socketChannel, Listener listener) throws ClosedChannelException {
+        this.worker = worker;
+        this.listener = listener;
+        this.key = socketChannel.register(worker.selector, 0, this);
+        worker.incrementUseCounter();
+    }
+
+    public void setInterestOps(int ops) {
+        interest = ops;
+    }
+
+    public void enable() {
+        key.interestOps(interest);
+        worker.selector.wakeup();
+    }
+
+    public void disable() {
+        key.interestOps(0);
+    }
+
+    public void close() {
+        worker.decrementUseCounter();
+        key.cancel();
+        worker.selector.wakeup();
+    }
+
+    public void onSelect() {
+        listener.onSelect(this);
+    }
+
+    public void onError(Throwable e) {
+        listener.onError(this, e);
+    }
 
-}
\ No newline at end of file
+}

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/peer/PeerTransportFactory.java Wed Aug  8 17:34:07 2007
@@ -21,10 +21,11 @@
 import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.activemq.broker.BrokerFactoryHandler;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
-import org.apache.activemq.broker.BrokerFactoryHandler;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportServer;
@@ -33,8 +34,6 @@
 import org.apache.activemq.util.IdGenerator;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
-
-import java.util.concurrent.ConcurrentHashMap;
 
 public class PeerTransportFactory extends TransportFactory {
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/DefaultReplayBuffer.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.transport.reliable;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 



Mime
View raw message