[hornetq-commits] JBoss hornetq SVN: r9648 - in branches/2_2_0_HA_Improvements/src/main/org/hornetq/core: server/cluster/impl and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Sep 6 11:51:39 EDT 2010


Author: jmesnil
Date: 2010-09-06 11:51:38 -0400 (Mon, 06 Sep 2010)
New Revision: 9648

Modified:
   branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
   branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorInternal.java
   branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
   branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
Log:
fix bridge initial connection attempts

Modified: branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2010-09-06 13:44:36 UTC (rev 9647)
+++ branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2010-09-06 15:51:38 UTC (rev 9648)
@@ -579,13 +579,11 @@
                      throw new HornetQException(HornetQException.NOT_CONNECTED,
                            "Cannot connect to server(s). Tried with all available servers.");
                   }
-                  /*
                   if (topologyArray == null && initialConnectors != null && attempts == initialConnectors.length)
                   {
                      throw new HornetQException(HornetQException.NOT_CONNECTED,
                      "Cannot connect to server(s). Tried with all available servers.");
                   }
-                  */
                   retry = true;
                }
                else

Modified: branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorInternal.java
===================================================================
--- branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorInternal.java	2010-09-06 13:44:36 UTC (rev 9647)
+++ branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorInternal.java	2010-09-06 15:51:38 UTC (rev 9648)
@@ -56,4 +56,6 @@
    void setBackup(boolean backup);
 
    void announceBackup();
+
+   void setInitialConnectAttempts(int reconnectAttempts);
 }

Modified: branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java	2010-09-06 13:44:36 UTC (rev 9647)
+++ branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java	2010-09-06 15:51:38 UTC (rev 9648)
@@ -517,7 +517,10 @@
          }
          catch (HornetQException e)
          {
-            csf.close();
+            if (csf != null)
+            {
+               csf.close();
+            }
 
             // the session was created while its server was starting, retry it:
             if (e.getCode() == HornetQException.SESSION_CREATION_REJECTED)

Modified: branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2010-09-06 13:44:36 UTC (rev 9647)
+++ branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2010-09-06 15:51:38 UTC (rev 9648)
@@ -637,6 +637,7 @@
       serverLocator.setRetryInterval(config.getRetryInterval());
       serverLocator.setRetryIntervalMultiplier(config.getRetryIntervalMultiplier());
       serverLocator.setClientFailureCheckPeriod(config.getClientFailureCheckPeriod());
+      serverLocator.setInitialConnectAttempts(config.getReconnectAttempts());
 
       Bridge bridge = new BridgeImpl(serverLocator,
                                      nodeUUID,



More information about the hornetq-commits mailing list