[hornetq-commits] JBoss hornetq SVN: r10947 - branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Jul 7 06:49:27 EDT 2011
Author: borges
Date: 2011-07-07 06:49:27 -0400 (Thu, 07 Jul 2011)
New Revision: 10947
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-720 call connect to replicationEndpoint.
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-07-07 10:48:36 UTC (rev 10946)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-07-07 10:49:27 UTC (rev 10947)
@@ -527,8 +527,9 @@
nodeManager.startBackup();
initialisePart1();
-
clusterManager.start();
+ // XXX this really belongs to this point?
+ initialisePart2();
String liveConnectorName = configuration.getLiveConnectorName();
@@ -552,7 +553,9 @@
CoreRemotingConnection liveConnection = liveServerSessionFactory.getConnection();
Channel liveChannel = liveConnection.getChannel(CHANNEL_ID.PING.id, -1);
liveChannel.send(new HaBackupRegistrationMessage(getNodeID().toString(), config));
- liveConnection.getChannel(CHANNEL_ID.REPLICATION.id, -1).setHandler(replicationEndpoint);
+ Channel replicationChannel = liveConnection.getChannel(CHANNEL_ID.REPLICATION.id, -1);
+ replicationChannel.setHandler(replicationEndpoint);
+ connectToReplicationEndpoint(replicationChannel);
replicationEndpoint.start();
liveChannel.send(new HaBackupRegistrationMessage(getNodeID().toString(), config));
@@ -564,10 +567,6 @@
nodeManager.awaitLiveNode();
// Server node (i.e. Life node) is not running, now the backup takes over.
- // XXX this really belongs to this point?
- initialisePart2();
-
-
configuration.setBackup(false);
}
@@ -995,6 +994,10 @@
return session;
}
+ /**
+ * XXX FIXME to be made private, and method removed from Server interface once HORNETQ-720 is
+ * finished.
+ */
public synchronized ReplicationEndpoint connectToReplicationEndpoint(final Channel channel) throws Exception
{
if (!configuration.isBackup())
More information about the hornetq-commits
mailing list