[jboss-cvs] JBossAS SVN: r59384 - trunk/cluster/src/main/org/jboss/ha/framework/server
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 5 13:51:11 EST 2007
Author: bstansberry at jboss.com
Date: 2007-01-05 13:51:10 -0500 (Fri, 05 Jan 2007)
New Revision: 59384
Modified:
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
Log:
Minor cleanups, logging improvement, comments, etc
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2007-01-05 18:50:25 UTC (rev 59383)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2007-01-05 18:51:10 UTC (rev 59384)
@@ -68,7 +68,6 @@
import org.jgroups.View;
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.MethodCall;
-import org.jgroups.blocks.RequestHandler;
import org.jgroups.blocks.RpcDispatcher;
import org.jgroups.debug.Debugger;
import org.jgroups.jmx.JChannelFactoryMBean;
@@ -677,7 +676,8 @@
// Initial viewAccepted
this.members = newMembers;
this.jgmembers = newjgMembers;
- log.debug("ViewAccepted: initial members set");
+ log.debug("ViewAccepted: initial members set for partition " + getPartitionName() + ": " +
+ this.currentViewId + " (" + this.members + ")");
return;
}
this.members = newMembers;
@@ -768,7 +768,7 @@
public ClusterNode[] getClusterNodes ()
{
ClusterNode[] nodes = new ClusterNode[this.members.size()];
- this.members.toArray(nodes);
+ nodes = (ClusterNode[]) this.members.toArray(nodes);
return nodes;
}
@@ -1395,6 +1395,10 @@
boolean pushNodeName = true;
String uniqueId = config.getNodeUniqueId();
if (uniqueId == null || "".equals(uniqueId)) {
+
+ // See if additional_data has already been set
+ // (likely by the JChannelFactory); if yes,
+ // just use that
IpAddress ourAddr = (IpAddress) channel.getLocalAddress();
if (ourAddr != null)
{
@@ -1402,14 +1406,13 @@
if (additional_data != null)
{
uniqueId = new String(additional_data);
- config.setNodeUniqueId(uniqueId);
pushNodeName = false;
}
}
}
+
if (uniqueId == null || "".equals(uniqueId)) {
uniqueId = generateUniqueId();
- config.setNodeUniqueId(uniqueId);
}
if (pushNodeName)
More information about the jboss-cvs-commits
mailing list