Author: clebert.suconic(a)jboss.com
Date: 2011-10-17 15:18:17 -0400 (Mon, 17 Oct 2011)
New Revision: 11560
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
Andy Taylor's fix to clusterconnection (to fix some tests)
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-10-17
15:33:57 UTC (rev 11559)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-10-17
19:18:17 UTC (rev 11560)
@@ -241,6 +241,14 @@
clusterConnector = new StaticClusterConnector(tcConfigs);
+ backupServerLocator = clusterConnector.createServerLocator(false);
+
+ if (backupServerLocator != null)
+ {
+ backupServerLocator.setReconnectAttempts(-1);
+ backupServerLocator.setInitialConnectAttempts(-1);
+ }
+
if (tcConfigs != null && tcConfigs.length > 0)
{
// a cluster connection will connect to other nodes only if they are directly
connected
@@ -340,6 +348,14 @@
clusterConnector = new DiscoveryClusterConnector(dg);
+ backupServerLocator = clusterConnector.createServerLocator(false);
+
+ if (backupServerLocator != null)
+ {
+ backupServerLocator.setReconnectAttempts(-1);
+ backupServerLocator.setInitialConnectAttempts(-1);
+ }
+
this.manager = manager;
}
@@ -450,12 +466,6 @@
public void announceBackup()
{
- this.backupServerLocator = clusterConnector.createServerLocator(false);
-
- backupServerLocator.setReconnectAttempts(-1);
- backupServerLocator.setInitialConnectAttempts(-1);
-
-
executor.execute(new Runnable()
{
public void run()