[hornetq-commits] JBoss hornetq SVN: r7990 - in branches/Branch_Replication_Changes: src/main/org/hornetq/core/server/impl and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Sep 24 12:14:44 EDT 2009
Author: timfox
Date: 2009-09-24 12:14:43 -0400 (Thu, 24 Sep 2009)
New Revision: 7990
Modified:
branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
branches/Branch_Replication_Changes/tests/src/org/hornetq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java
Log:
replication changes
Modified: branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2009-09-24 15:50:40 UTC (rev 7989)
+++ branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2009-09-24 16:14:43 UTC (rev 7990)
@@ -500,22 +500,22 @@
private void fail()
{
+ log.info("bridge " + name + " has failed");
+
if (started)
{
- //executor.execute(new FailRunnable());
-
try
{
- cancelRefs();
+ setupNotificationConsumer();
- //setupNotificationConsumer();
+ cancelRefs();
}
catch (Exception e)
{
log.error("Failed to handle failure", e);
}
- }
- }
+ }
+ }
private ClientConsumer notifConsumer;
@@ -620,8 +620,7 @@
}
try
- {
- csf = null;
+ {
if (discoveryAddress != null)
{
csf = new ClientSessionFactoryImpl(discoveryAddress, discoveryPort);
@@ -708,56 +707,6 @@
}
}
-// private class FailRunnable implements Runnable
-// {
-// public void run()
-// {
-// synchronized (BridgeImpl.this)
-// {
-//
-// if (!started)
-// {
-// return;
-// }
-//
-// if (flowRecord != null)
-// {
-// try
-// {
-// // flowRecord.reset();
-// }
-// catch (Exception e)
-// {
-// log.error("Failed to reset", e);
-// }
-// }
-//
-// active = false;
-// }
-//
-// try
-// {
-// queue.removeConsumer(BridgeImpl.this);
-//
-// session.cleanUp();
-//
-// cancelRefs();
-//
-// csf.close();
-// }
-// catch (Exception e)
-// {
-// log.error("Failed to stop", e);
-// }
-//
-// if (!createObjects())
-// {
-// started = false;
-// }
-// }
-// }
-// }
-
private class CreateObjectsRunnable implements Runnable
{
public synchronized void run()
Modified: branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2009-09-24 15:50:40 UTC (rev 7989)
+++ branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2009-09-24 16:14:43 UTC (rev 7990)
@@ -388,7 +388,7 @@
retryInterval,
1d,
-1,
- false,
+ true,
useDuplicateDetection,
managementService.getManagementAddress(),
managementService.getManagementNotificationAddress(),
Modified: branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-09-24 15:50:40 UTC (rev 7989)
+++ branches/Branch_Replication_Changes/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-09-24 16:14:43 UTC (rev 7990)
@@ -1348,12 +1348,19 @@
public void handleCloseConsumer(final SessionConsumerCloseMessage packet)
{
final ServerConsumer consumer = consumers.get(packet.getConsumerID());
-
+
Packet response;
try
{
- consumer.close();
+ if (consumer != null)
+ {
+ consumer.close();
+ }
+ else
+ {
+ log.error("Cannot find consumer with id " + packet.getConsumerID());
+ }
response = new NullResponseMessage();
}
Modified: branches/Branch_Replication_Changes/tests/src/org/hornetq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java
===================================================================
--- branches/Branch_Replication_Changes/tests/src/org/hornetq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java 2009-09-24 15:50:40 UTC (rev 7989)
+++ branches/Branch_Replication_Changes/tests/src/org/hornetq/tests/integration/cluster/distribution/OnewayTwoNodeClusterTest.java 2009-09-24 16:14:43 UTC (rev 7990)
@@ -147,8 +147,12 @@
long start = System.currentTimeMillis();
+ log.info("stopping server 1");
+
stopServers(1);
+ log.info("restarting server 1");
+
startServers(1);
long end = System.currentTimeMillis();
More information about the hornetq-commits
mailing list