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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 25 15:02:44 EDT 2008


Author: jhowell at redhat.com
Date: 2008-03-25 15:02:43 -0400 (Tue, 25 Mar 2008)
New Revision: 3938

Modified:
   branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/postoffice/GroupMember.java
Log:
[JBMESSAGING-1254] more verbose changes for membership change events

Modified: branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/postoffice/GroupMember.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/postoffice/GroupMember.java	2008-03-25 18:43:10 UTC (rev 3937)
+++ branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/postoffice/GroupMember.java	2008-03-25 19:02:43 UTC (rev 3938)
@@ -472,7 +472,7 @@
 
       public void viewAccepted(final View newView)
       {     	
-      	log.debug(this  + " got new view " + newView + ", old view is " + currentView);
+      	 log.info(this  + " got new view " + newView + ", old view is " + currentView);
 		      	
          if (newView instanceof MergeView)
          {
@@ -485,6 +485,7 @@
          
          currentView = newView;
          
+         log.info("I am (" + controlChannel.getLocalAddress() + ")");
          //If the first view shows we are the co-ordinator i.e. first node then we can create a latch
          //But only the first time and we don't want to do this after ready had been set to true
          //Otherwise it will never get released!
@@ -513,17 +514,24 @@
                if (!leftNodes.isEmpty())
                {
                	groupListener.nodesLeft(leftNodes);
+                log.info("Dead members: " + leftNodes.size() + " (" + leftNodes + ")");
                }
             }
-
+            List nodesAdded=new ArrayList();
             for (Iterator i = newView.getMembers().iterator(); i.hasNext(); )
             {
                Address address = (Address)i.next();
                if (oldView == null || !oldView.containsMember(address))
                {
                   groupListener.nodeJoined(address);
+                  nodesAdded.add(address);
                }
             }
+            if (!nodesAdded.isEmpty())
+            {
+            	log.info("New Members : " + nodesAdded.size()  + " (" + nodesAdded + ")");
+            }
+            log.info("All Members : " + newView.getMembers().size()  + " (" + newView.getMembers() + ")");
          }
          catch (Throwable e)
          {




More information about the jboss-cvs-commits mailing list