[jboss-cvs] JBoss Messaging SVN: r2854 - trunk/src/main/org/jboss/jms/client.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 6 18:59:29 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-07-06 18:59:29 -0400 (Fri, 06 Jul 2007)
New Revision: 2854

Modified:
   trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
   trunk/src/main/org/jboss/jms/client/FailoverEvent.java
Log:
Fixing FailoverStressTest

Modified: trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java	2007-07-06 22:29:34 UTC (rev 2853)
+++ trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java	2007-07-06 22:59:29 UTC (rev 2854)
@@ -81,6 +81,8 @@
       boolean failoverSuccessful = false;
       
       boolean valveOpened = false;
+
+      int failoverEvent = FailoverEvent.FAILOVER_COMPLETED;
       
       try
       {
@@ -100,6 +102,8 @@
                   "already (or is in process of being) performed on this connection");
                
                failoverSuccessful = true;
+
+               failoverEvent = FailoverEvent.FAILOVER_ALREADY_COMPLETED;
                
                //Return true since failover already completed ok
                return true;
@@ -169,7 +173,7 @@
          if (failoverSuccessful)
          {
             log.debug(this + " completed successful failover");
-            broadcastFailoverEvent(new FailoverEvent(FailoverEvent.FAILOVER_COMPLETED, this));
+            broadcastFailoverEvent(new FailoverEvent(failoverEvent, this));
          }
          else
          {

Modified: trunk/src/main/org/jboss/jms/client/FailoverEvent.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/FailoverEvent.java	2007-07-06 22:29:34 UTC (rev 2853)
+++ trunk/src/main/org/jboss/jms/client/FailoverEvent.java	2007-07-06 22:59:29 UTC (rev 2854)
@@ -22,6 +22,8 @@
 	public static final int FAILURE_DETECTED = 10;
    public static final int FAILOVER_STARTED = 20;
    public static final int FAILOVER_COMPLETED = 30;
+   /** Failover was completed in parallel by another thread */
+   public static final int FAILOVER_ALREADY_COMPLETED = 40;
    public static final int FAILOVER_FAILED = 100;
 
    // Static ---------------------------------------------------------------------------------------




More information about the jboss-cvs-commits mailing list