[jboss-cvs] JBoss Messaging SVN: r8467 - in branches/JBPAPP-7460: src/main/org/jboss/messaging/core/impl/postoffice and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 1 06:51:51 EDT 2011


Author: raggz
Date: 2011-11-01 06:51:51 -0400 (Tue, 01 Nov 2011)
New Revision: 8467

Modified:
   branches/JBPAPP-7460/
   branches/JBPAPP-7460/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
Backport of JBMessaging-1901


Property changes on: branches/JBPAPP-7460
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/Branch_1_4:8114,8155-8158,8233-8234,8447
/branches/JBM1842:8169-8232
   + /branches/Branch_1_4:8114,8155-8158,8233-8234,8447,8452-8453
/branches/JBM1842:8169-8232

Modified: branches/JBPAPP-7460/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/JBPAPP-7460/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2011-11-01 10:50:04 UTC (rev 8466)
+++ branches/JBPAPP-7460/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2011-11-01 10:51:51 UTC (rev 8467)
@@ -865,6 +865,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)
@@ -1730,7 +1744,7 @@
                catch (Exception e)
                {
                   log.error("Having problem update myself. Shutting down to avoid message duplicated delivery.");
-                  this.serverPeer.stopJBMNodeForRecovery();
+                  stateMonitor.stopJBMNodeForRecovery();
                   return;
                }
             }
@@ -4202,6 +4216,12 @@
          }
       }
       
+      public synchronized void stopJBMNodeForRecovery()
+      {
+         disableViewUpdate();
+         serverPeer.stopJBMNodeForRecovery();
+      }
+
       public synchronized void run()
       {
          do
@@ -4219,7 +4239,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