[jboss-cvs] JBoss Messaging SVN: r3207 - trunk/src/main/org/jboss/messaging/core/impl/postoffice.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 19 09:42:22 EDT 2007
Author: timfox
Date: 2007-10-19 09:42:22 -0400 (Fri, 19 Oct 2007)
New Revision: 3207
Modified:
trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
Replace semaphore when failover node changes
Modified: trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2007-10-19 13:33:19 UTC (rev 3206)
+++ trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2007-10-19 13:42:22 UTC (rev 3207)
@@ -225,6 +225,8 @@
//overwhelming JGroups
private Semaphore replicateSemaphore;
+ private int maxConcurrentReplications;
+
// Constructors ---------------------------------------------------------------------------------
/*
@@ -306,6 +308,8 @@
nbSupport = new NotificationBroadcasterSupport();
+ this.maxConcurrentReplications = maxConcurrentReplications;
+
replicateSemaphore = new Semaphore(maxConcurrentReplications, true);
}
@@ -2845,6 +2849,14 @@
}
}
}
+
+ //Now we replace the semaphore since some of the acks may not come back from the old failover node
+ if (this.replicateSemaphore != null)
+ {
+ replicateSemaphore.release(maxConcurrentReplications);
+
+ replicateSemaphore = new Semaphore(maxConcurrentReplications);
+ }
}
More information about the jboss-cvs-commits
mailing list