[hornetq-commits] JBoss hornetq SVN: r11563 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Oct 18 11:58:28 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-10-18 11:58:28 -0400 (Tue, 18 Oct 2011)
New Revision: 11563

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
it's not necessary to reset topologyArray to null on ServerLocators used at clusterConnections

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-10-18 04:05:30 UTC (rev 11562)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-10-18 15:58:28 UTC (rev 11563)
@@ -1290,23 +1290,30 @@
 
       if (topology.removeMember(eventTime, nodeID))
       {
-         synchronized (this)
+         if (clusterConnection)
          {
-            if (topology.isEmpty())
+            updateArraysAndPairs();
+         }
+         else
+         {
+            synchronized (this)
             {
-               // Resetting the topology to its original condition as it was brand new
-               receivedTopology = false;
-               topologyArray = null;
-            }
-            else
-            {
-               updateArraysAndPairs();
-
-               if (topology.nodes() == 1 && topology.getMember(this.nodeID) != null)
+               if (topology.isEmpty())
                {
                   // Resetting the topology to its original condition as it was brand new
                   receivedTopology = false;
+                  topologyArray = null;
                }
+               else
+               {
+                  updateArraysAndPairs();
+   
+                  if (topology.nodes() == 1 && topology.getMember(this.nodeID) != null)
+                  {
+                     // Resetting the topology to its original condition as it was brand new
+                     receivedTopology = false;
+                  }
+               }
             }
          }
       }



More information about the hornetq-commits mailing list