Author: ataylor
Date: 2011-07-08 06:36:02 -0400 (Fri, 08 Jul 2011)
New Revision: 10957
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
stop re3plication endpoint and initialise2 after failover
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-07-07
15:54:23 UTC (rev 10956)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-07-08
10:36:02 UTC (rev 10957)
@@ -282,14 +282,9 @@
throw new IllegalArgumentException("Unsupported journal type " +
config.getJournalType());
}
- if (config.isBackup() && !config.isSharedStore())
- {
- idGenerator = null;
- }
- else
- {
- idGenerator = new BatchingIDGenerator(0,
JournalStorageManager.CHECKPOINT_BATCH_SIZE, bindingsJournal);
- }
+
+ idGenerator = new BatchingIDGenerator(0,
JournalStorageManager.CHECKPOINT_BATCH_SIZE, bindingsJournal);
+
Journal localMessage = new JournalImpl(config.getJournalFileSize(),
config.getJournalMinFiles(),
config.getJournalCompactMinFiles(),
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java 2011-07-07
15:54:23 UTC (rev 10956)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java 2011-07-08
10:36:02 UTC (rev 10957)
@@ -156,11 +156,11 @@
throw new HornetQException(HornetQException.SESSION_CREATION_REJECTED,
"Server not started");
}
- if (!server.checkActivate())
+ /*if (!server.checkActivate())
{
throw new HornetQException(HornetQException.SESSION_CREATION_REJECTED,
"Server will not accept create session
requests");
- }
+ }*/
Channel channel = connection.getChannel(request.getSessionChannelID(),
request.getWindowSize());
@@ -239,7 +239,7 @@
ServerSessionPacketHandler sessionHandler =
protocolManager.getSessionHandler(request.getName());
- if (!server.checkActivate() || sessionHandler == null)
+ if (sessionHandler == null)
{
response = new ReattachSessionResponseMessage(-1, false);
}
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
15:54:23 UTC (rev 10956)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-07-08
10:36:02 UTC (rev 10957)
@@ -535,9 +535,6 @@
initialisePart1();
clusterManager.start();
- // XXX this really belongs to this point?
- initialisePart2();
- started = true;
String liveConnectorName = configuration.getLiveConnectorName();
if (liveConnectorName == null)
@@ -571,9 +568,12 @@
"] started, waiting live to fail before it gets active");
nodeManager.awaitLiveNode();
// Server node (i.e. Life node) is not running, now the backup takes over.
-
+ replicationEndpoint.stop();
configuration.setBackup(false);
+ initialisePart2();
+ started = true;
+
}
catch (Exception e)
{
Show replies by date