[hornetq-commits] JBoss hornetq SVN: r12259 - in trunk/hornetq-core/src/main/java/org/hornetq/core/server: cluster/impl and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Mar 7 07:49:28 EST 2012
Author: borges
Date: 2012-03-07 07:49:27 -0500 (Wed, 07 Mar 2012)
New Revision: 12259
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-720 Announce replicating backup to cluster when up-to-date.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java 2012-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -48,7 +48,7 @@
void flushExecutor();
- void announceBackup() throws Exception;
+ void announceBackup();
void deploy() throws Exception;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2012-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -60,7 +60,7 @@
*
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
* @author Clebert Suconic
- *
+ *
* Created 18 Nov 2008 09:23:49
*
*
@@ -80,7 +80,7 @@
private final PostOffice postOffice;
private final ScheduledExecutorService scheduledExecutor;
-
+
private ClusterConnection defaultClusterConnection;
private final ManagementService managementService;
@@ -155,7 +155,7 @@
return str.toString();
}
-
+
public ClusterConnection getDefaultConnection()
{
return defaultClusterConnection;
@@ -166,7 +166,7 @@
{
return "ClusterManagerImpl[server=" + server + "]@" + System.identityHashCode(this);
}
-
+
public String getNodeId()
{
return nodeUUID.toString();
@@ -202,7 +202,7 @@
group.start();
}
}
-
+
for (ClusterConnection conn : clusterConnections.values())
{
conn.start();
@@ -357,7 +357,8 @@
}
}
- public void announceBackup() throws Exception
+ @Override
+ public void announceBackup()
{
for (ClusterConnection conn : this.clusterConnections.values())
{
@@ -399,7 +400,7 @@
{
this.clusterLocators.remove(serverLocator);
}
-
+
public synchronized void deployBridge(final BridgeConfiguration config, final boolean start) throws Exception
{
if (config.getName() == null)
@@ -503,7 +504,7 @@
serverLocator.setProducerWindowSize(-1);
// This will be set to 30s unless it's changed from embedded / testing
- // there is no reason to exception the config for this timeout
+ // there is no reason to exception the config for this timeout
// since the Bridge is supposed to be non-blocking and fast
// We may expose this if we find a good use case
serverLocator.setCallTimeout(config.getCallTimeout());
@@ -537,7 +538,7 @@
bridges.put(config.getName(), bridge);
managementService.registerBridge(bridge, config);
-
+
if (start)
{
bridge.start();
@@ -594,14 +595,14 @@
}
// Private methods ----------------------------------------------------------------------------------------------------
-
-
+
+
private void clearClusterConnections()
{
clusterConnections.clear();
this.defaultClusterConnection = null;
}
-
+
private void deployClusterConnection(final ClusterConnectionConfiguration config) throws Exception
{
if (config.getName() == null)
@@ -729,7 +730,7 @@
{
defaultClusterConnection = clusterConnection;
}
-
+
managementService.registerCluster(clusterConnection, config);
clusterConnections.put(config.getName(), clusterConnection);
@@ -739,7 +740,7 @@
log.debug("ClusterConnection.start at " + clusterConnection, new Exception("trace"));
}
}
-
+
private Transformer instantiateTransformer(final String transformerClassName)
{
Transformer transformer = null;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -2385,6 +2385,7 @@
public void setRemoteBackupUpToDate(String nodeID)
{
nodeManager.setNodeID(nodeID);
+ clusterManager.announceBackup();
backupUpToDate = true;
}
More information about the hornetq-commits
mailing list