Author: clebert.suconic(a)jboss.com
Date: 2011-10-18 00:05:30 -0400 (Tue, 18 Oct 2011)
New Revision: 11562
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
fixing tests
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
02:38:12 UTC (rev 11561)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-10-18
04:05:30 UTC (rev 11562)
@@ -1300,7 +1300,7 @@
}
else
{
- updateArraysAndPairs(false);
+ updateArraysAndPairs();
if (topology.nodes() == 1 && topology.getMember(this.nodeID) !=
null)
{
@@ -1345,8 +1345,18 @@
}
}
- updateArraysAndPairs(last);
+ updateArraysAndPairs();
}
+
+ if (last)
+ {
+ synchronized (this)
+ {
+ receivedTopology = true;
+ // Notify if waiting on getting topology
+ notifyAll();
+ }
+ }
}
/* (non-Javadoc)
@@ -1373,7 +1383,7 @@
}
}
- private synchronized void updateArraysAndPairs(final boolean updateReceived)
+ private synchronized void updateArraysAndPairs()
{
Collection<TopologyMember> membersCopy = topology.getMembers();
@@ -1385,12 +1395,6 @@
{
topologyArray[count++] = pair.getConnector();
}
-
- if (updateReceived)
- {
- receivedTopology = true;
- notifyAll();
- }
}
public synchronized void connectorsChanged()