[hornetq-commits] JBoss hornetq SVN: r10885 - in branches/HORNETQ-720_Replication: etc and 7 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jun 27 10:14:48 EDT 2011


Author: borges
Date: 2011-06-27 10:14:47 -0400 (Mon, 27 Jun 2011)
New Revision: 10885

Modified:
   branches/HORNETQ-720_Replication/
   branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.core.prefs
   branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.ui.prefs
   branches/HORNETQ-720_Replication/hornetq-core/pom.xml
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java
   branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java
Log:
merge changes from trunk


Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk:10878-10884

Modified: branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.core.prefs
===================================================================
--- branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.core.prefs	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.core.prefs	2011-06-27 14:14:47 UTC (rev 10885)
@@ -1,4 +1,4 @@
-#Fri Jun 17 11:54:22 CEST 2011
+#Thu Jun 23 17:28:54 CEST 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.codeComplete.argumentPrefixes=
 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -19,6 +19,7 @@
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
 org.eclipse.jdt.core.compiler.source=1.6
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82
@@ -87,7 +88,7 @@
 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
 org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
 org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false
 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true

Modified: branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.ui.prefs	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/etc/org.eclipse.jdt.ui.prefs	2011-06-27 14:14:47 UTC (rev 10885)
@@ -1,4 +1,4 @@
-#Wed Jun 15 11:33:43 CEST 2011
+#Thu Jun 23 17:29:46 CEST 2011
 cleanup.add_default_serial_version_id=false
 cleanup.add_generated_serial_version_id=true
 cleanup.add_missing_annotations=true
@@ -82,7 +82,7 @@
 sp_cleanup.format_source_code=true
 sp_cleanup.format_source_code_changes_only=true
 sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=true
+sp_cleanup.make_parameters_final=false
 sp_cleanup.make_private_fields_final=true
 sp_cleanup.make_type_abstract_if_missing_method=false
 sp_cleanup.make_variable_declarations_final=true
@@ -100,7 +100,7 @@
 sp_cleanup.remove_trailing_whitespaces_all=true
 sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
 sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unnecessary_nls_tags=false
 sp_cleanup.remove_unused_imports=true
 sp_cleanup.remove_unused_local_variables=false
 sp_cleanup.remove_unused_private_fields=true

Modified: branches/HORNETQ-720_Replication/hornetq-core/pom.xml
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/pom.xml	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/pom.xml	2011-06-27 14:14:47 UTC (rev 10885)
@@ -1,5 +1,5 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -88,6 +88,36 @@
             </executions>
          </plugin>
       </plugins>
+      <pluginManagement>
+         <plugins>
+            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence 
+               on the Maven build itself. -->
+            <plugin>
+               <groupId>org.eclipse.m2e</groupId>
+               <artifactId>lifecycle-mapping</artifactId>
+               <version>1.0.0</version>
+               <configuration>
+                  <lifecycleMappingMetadata>
+                     <pluginExecutions>
+                        <pluginExecution>
+                           <pluginExecutionFilter>
+                              <groupId>org.codehaus.mojo</groupId>
+                              <artifactId>javacc-maven-plugin</artifactId>
+                              <versionRange>[2.6,)</versionRange>
+                              <goals>
+                                 <goal>javacc</goal>
+                              </goals>
+                           </pluginExecutionFilter>
+                           <action>
+                              <ignore/>
+                           </action>
+                        </pluginExecution>
+                     </pluginExecutions>
+                  </lifecycleMappingMetadata>
+               </configuration>
+            </plugin>
+         </plugins>
+      </pluginManagement>
    </build>
 
 </project>

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -13,14 +13,13 @@
 
 package org.hornetq.core.client.impl;
 
-import org.hornetq.api.core.HornetQException;
+import java.util.concurrent.Executor;
+
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSessionFactory;
 import org.hornetq.api.core.client.ServerLocator;
 
-import java.util.concurrent.Executor;
-
 /**
  * A ServerLocatorInternal
  *
@@ -31,7 +30,7 @@
 public interface ServerLocatorInternal extends ServerLocator
 {
    void start(Executor executor) throws Exception;
-   
+
    void factoryClosed(final ClientSessionFactory factory);
 
    void setNodeID(String nodeID);
@@ -53,7 +52,7 @@
    void setClusterTransportConfiguration(TransportConfiguration tc);
 
    boolean isBackup();
-   
+
    void setBackup(boolean backup);
 
    Topology getTopology();

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -24,7 +24,7 @@
  *
  */
 public interface CoreRemotingConnection extends RemotingConnection
-{  
+{
    /**
     * return the channel with the channel id specified.
     * <p/>
@@ -74,7 +74,7 @@
    long getIDGeneratorSequence();
 
    /**
-    * return the current tomeout for blocking calls
+    * Return the current timeout for blocking calls.
     *
     * @return the timeout in milliseconds
     */
@@ -86,7 +86,7 @@
     * @return the lock
     */
    Object getTransferLock();
-   
+
    /**
     * Called periodically to flush any data in the batch buffer
     */

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -17,21 +17,22 @@
 import org.hornetq.spi.core.protocol.RemotingConnection;
 
 /**
- * A Packet represents a pcaket of data transmitted over a connection.
+ * A Packet represents a packet of data transmitted over a connection.
  *
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  */
 public interface Packet
 {
    /**
-    * This sets the channel id that should be used once the packet has been successfully decoded it is sent to the correct channel.
-    *
+    * Sets the channel id that should be used once the packet has been successfully decoded it is
+    * sent to the correct channel.
+    * 
     * @param channelID the id of the channel to handle the packet
     */
    void setChannelID(long channelID);
 
    /**
-    * returns the channel id of the channel that should handle this pcaket
+    * Returns the channel id of the channel that should handle this packet.
     *
     * @return the id of the channel
     */
@@ -81,6 +82,6 @@
     * @return true if confirmation is required
     */
    boolean isRequiresConfirmations();
-   
+
    boolean isAsyncExec();
 }

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -51,11 +51,9 @@
 import org.hornetq.utils.ExecutorFactory;
 
 /**
- * A RepplicationManagerImpl
- *
+ * A ReplicationManagerImpl
+ * 
  * @author <mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- *
- *
  */
 public class ReplicationManagerImpl implements ReplicationManager
 {

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -17,12 +17,16 @@
 
 import java.lang.reflect.Array;
 import java.net.InetAddress;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 
-
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.SimpleString;
@@ -33,7 +37,10 @@
 import org.hornetq.core.client.impl.ServerLocatorInternal;
 import org.hornetq.core.client.impl.Topology;
 import org.hornetq.core.client.impl.TopologyMember;
-import org.hornetq.core.config.*;
+import org.hornetq.core.config.BridgeConfiguration;
+import org.hornetq.core.config.BroadcastGroupConfiguration;
+import org.hornetq.core.config.ClusterConnectionConfiguration;
+import org.hornetq.core.config.Configuration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.postoffice.Binding;
 import org.hornetq.core.postoffice.PostOffice;
@@ -54,7 +61,7 @@
  * A ClusterManagerImpl
  *
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
+ *
  * Created 18 Nov 2008 09:23:49
  *
  *
@@ -92,18 +99,18 @@
 
    // regular client listeners to be notified of cluster topology changes.
    // they correspond to regular clients using a HA ServerLocator
-   private Set<ClusterTopologyListener> clientListeners = new ConcurrentHashSet<ClusterTopologyListener>();
-   
+   private final Set<ClusterTopologyListener> clientListeners = new ConcurrentHashSet<ClusterTopologyListener>();
+
    // cluster connections listeners to be notified of cluster topology changes
    // they correspond to cluster connections on *other nodes connected to this one*
-   private Set<ClusterTopologyListener> clusterConnectionListeners = new ConcurrentHashSet<ClusterTopologyListener>();
+   private final Set<ClusterTopologyListener> clusterConnectionListeners = new ConcurrentHashSet<ClusterTopologyListener>();
 
-   private Topology topology = new Topology();
+   private final Topology topology = new Topology();
 
    private volatile ServerLocatorInternal backupServerLocator;
 
    private final List<ServerLocatorInternal> clusterLocators = new ArrayList<ServerLocatorInternal>();
-   private Executor executor;
+   private final Executor executor;
 
    public ClusterManagerImpl(final ExecutorFactory executorFactory,
                              final HornetQServer server,
@@ -173,7 +180,7 @@
       {
          announceNode();
       }
-      
+
       started = true;
    }
 
@@ -200,7 +207,7 @@
             clusterConnection.stop();
             managementService.unregisterCluster(clusterConnection.getName().toString());
          }
-         
+
          clusterConnectionListeners.clear();
          clientListeners.clear();
          clusterConnections.clear();
@@ -238,7 +245,7 @@
       }
 
       boolean removed = topology.removeMember(nodeID);
-      
+
       if (removed)
       {
 
@@ -254,6 +261,7 @@
       }
    }
 
+   // XXX Why is the interface's parameter 'backup' now 'last'?
    public void notifyNodeUp(final String nodeID,
                             final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
                             final boolean last,
@@ -349,7 +357,7 @@
    {
       return topology;
    }
-   
+
    // backup node becomes live
   public synchronized void activate()
    {
@@ -496,7 +504,7 @@
       {
          listener.nodeUP(nodeID, member.getConnector(), false);
       }
-      
+
       for (ClusterTopologyListener listener : clusterConnectionListeners)
       {
          listener.nodeUP(nodeID, member.getConnector(), false);
@@ -720,7 +728,7 @@
          managementService.unregisterBridge(name);
       }
    }
-   
+
    private synchronized void deployClusterConnection(final ClusterConnectionConfiguration config) throws Exception
    {
       if (config.getName() == null)
@@ -816,7 +824,7 @@
       clusterConnections.put(config.getName(), clusterConnection);
 
       clusterConnection.start();
-      
+
       if(backup)
       {
          announceBackup(config, connector);
@@ -866,7 +874,7 @@
             }
             catch (Exception e)
             {
-               log.warn("Unable to announce backup", e); 
+               log.warn("Unable to announce backup", e);
             }
          }
       });

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -13,25 +13,31 @@
 
 package org.hornetq.core.server.impl;
 
+import static org.hornetq.core.server.impl.InVMNodeManager.State.FAILING_BACK;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.LIVE;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.NOT_STARTED;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.PAUSED;
+
+import java.util.concurrent.Semaphore;
+
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.core.server.NodeManager;
 import org.hornetq.utils.UUIDGenerator;
 
-import java.util.concurrent.Semaphore;
-
-import static org.hornetq.core.server.impl.InVMNodeManager.State.*;
-
 /**
- * @author <a href="mailto:andy.taylor at jboss.com">Andy Taylor</a>
- *         Date: Oct 13, 2010
- *         Time: 3:55:47 PM
+ * This is a _mock_ NodeManager and is used only in tests.
+ * <p>
+ * It allows writing tests without the need to spawn a new JVM.
+ * 
+ * @author <a href="mailto:andy.taylor at jboss.com">Andy Taylor</a> Date: Oct 13, 2010 Time: 3:55:47
+ *         PM
  */
 public class InVMNodeManager extends NodeManager
 {
 
-   private Semaphore liveLock;
+   private final Semaphore liveLock;
 
-   private Semaphore backupLock;
+   private final Semaphore backupLock;
 
    public enum State {LIVE, PAUSED, FAILING_BACK, NOT_STARTED}
 
@@ -119,7 +125,7 @@
    @Override
    public boolean isAwaitingFailback() throws Exception
    {
-      return state == FAILING_BACK; 
+      return state == FAILING_BACK;
    }
 
    @Override

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -17,11 +17,12 @@
 import org.hornetq.core.server.management.NotificationService;
 
 /**
- * An Acceptor is used by the Remoting Service to allow clients to connect. It should take care of dispatching client requests
- * to the Remoting Service's Dispatcher.
- *
+ * An Acceptor is used by the Remoting Service to allow clients to connect. It should take care of
+ * dispatching client requests to the Remoting Service's Dispatcher.
+ * 
  * @author <a href="ataylor at redhat.com">Andy Taylor</a>
  * @author <a href="tim.fox at jboss.com">Tim Fox</a>
+ * @see Connector
  */
 public interface Acceptor extends HornetQComponent
 {

Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java	2011-06-27 13:41:35 UTC (rev 10884)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java	2011-06-27 14:14:47 UTC (rev 10885)
@@ -20,17 +20,17 @@
 public interface Connector
 {
    /**
-    * starts the connector
+    * Starts the connector.
     */
    void start();
 
    /**
-    * closes the connector
+    * Closes the connector.
     */
    void close();
 
    /**
-    * returns true if the connector is started, oterwise false.
+    * Returns true if the connector is started, otherwise false.
     *
     * @return true if the connector is started
     */
@@ -39,9 +39,9 @@
    /**
     * Create and return a connection from this connector.
     * <p/>
-    * This method must NOT throw an exception if it fails to create the connection
-    * (e.g. network is not available), in this case it MUST return null
-    *
+    * This method must NOT throw an exception if it fails to create the connection (e.g. network is
+    * not available), in this case it MUST return {@code null}.
+    * 
     * @return The connection, or null if unable to create a connection (e.g. network is unavailable)
     */
    Connection createConnection();



More information about the hornetq-commits mailing list