[jboss-cvs] JBoss Messaging SVN: r8453 - branches/Branch_1_4/src/main/org/jboss/messaging/core/impl/postoffice.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 20 08:44:23 EDT 2011


Author: gaohoward
Date: 2011-10-20 08:44:23 -0400 (Thu, 20 Oct 2011)
New Revision: 8453

Modified:
   branches/Branch_1_4/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
JBMESSAGING-1901


Modified: branches/Branch_1_4/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2011-10-20 04:14:27 UTC (rev 8452)
+++ branches/Branch_1_4/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2011-10-20 12:44:23 UTC (rev 8453)
@@ -871,6 +871,20 @@
       return true;
    }
 
+   //force view update stop, don't wait
+   public void disableViewUpdate()
+   {
+      if (!clustered) return;
+      synchronized (viewUpdateLock)
+      {
+         if (stopUpdate) return;
+         stopUpdate = true;
+         updateThread = null;
+         viewUpdateLock.notify();
+      }
+      log.trace("View update disabled");
+   }
+   
    public void endProcessView()
    {
       synchronized (viewUpdateLock)
@@ -4238,7 +4252,8 @@
       
       public synchronized void stopJBMNodeForRecovery()
       {
-          serverPeer.stopJBMNodeForRecovery();
+         disableViewUpdate();
+         serverPeer.stopJBMNodeForRecovery();
       }
 
       public synchronized void run()
@@ -4258,7 +4273,7 @@
                else if (clusterState.isQuarantined(thisNodeID))
                {
                   log.error("I'm orphaned and now I can't tell others that I'm alive. Shutdown node: " + thisNodeID);
-                  serverPeer.stopJBMNodeForRecovery();
+                  stopJBMNodeForRecovery();
                   working = false;
                   nodeStateRefreshInterval = 1; //let the thread quite quickly.
                }



More information about the jboss-cvs-commits mailing list