Author: clebert.suconic(a)jboss.com
Date: 2011-07-27 02:22:54 -0400 (Wed, 27 Jul 2011)
New Revision: 11049
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
fixes and debug
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-27
01:57:20 UTC (rev 11048)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-27
06:22:54 UTC (rev 11049)
@@ -1412,7 +1412,7 @@
SimpleString nodeID = msg.getNodeID();
if (log.isTraceEnabled())
{
- log.trace("XXX notifyDown nodeID=" + msg.getNodeID() +
" on serverLocator=" + serverLocator);
+ log.trace("XXX YYY notifyDown nodeID=" + msg.getNodeID() +
" on serverLocator=" + serverLocator);
}
if (nodeID != null)
{
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-27
01:57:20 UTC (rev 11048)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-27
06:22:54 UTC (rev 11049)
@@ -1098,9 +1098,18 @@
{
if (closed)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("YYY " + this + " is already closed when calling
closed");
+ }
return;
}
+ if (log.isDebugEnabled())
+ {
+ log.debug("YYY " + this + " is calling close", new Exception
("trace"));
+ }
+
closing = true;
if (discoveryGroup != null)
@@ -1182,7 +1191,7 @@
if (log.isDebugEnabled())
{
- log.debug("XXX YYY " + this + "::Notify nodeID=" + nodeID +
" as being down");
+ log.debug("XXX YYY nodeDown " + this + " nodeID=" + nodeID +
" as being down", new Exception("trace"));
}
removed = topology.removeMember(nodeID);
@@ -1227,7 +1236,7 @@
if (log.isDebugEnabled())
{
- log.debug("XXX YYY " + this + "::notifyNodeUp " + nodeID +
", connctorPair=" + connectorPair);
+ log.debug("XXX YYY NodeUp " + this + "::nodeID=" + nodeID +
", connectorPair=" + connectorPair);
}
topology.addMember(nodeID, new TopologyMember(connectorPair));
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java 2011-07-27
01:57:20 UTC (rev 11048)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java 2011-07-27
06:22:54 UTC (rev 11049)
@@ -17,6 +17,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClusterTopologyListener;
@@ -59,7 +60,7 @@
* keys are node IDs
* values are a pair of live/backup transport configurations
*/
- private Map<String, TopologyMember> topology = new HashMap<String,
TopologyMember>();
+ private Map<String, TopologyMember> topology = new ConcurrentHashMap<String,
TopologyMember>();
private boolean debug = log.isDebugEnabled();
@@ -112,12 +113,12 @@
TopologyMember member = topology.remove(nodeId);
if (log.isDebugEnabled())
{
- log.debug("XXX Removing member " + member, new Exception
("trace"));
+ log.debug("XXX " + this + " removing nodeID=" + nodeId +
", result=" + member, new Exception ("trace"));
}
return (member != null);
}
- public void sendTopology(ClusterTopologyListener listener)
+ public synchronized void sendTopology(ClusterTopologyListener listener)
{
int count = 0;
Map<String, TopologyMember> copy;
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-27
01:57:20 UTC (rev 11048)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-27
06:22:54 UTC (rev 11049)
@@ -412,7 +412,7 @@
if (serverLocator != null)
{
serverLocator.setNodeID(nodeUUID.toString());
- serverLocator.setIdentity(server.toString());
+ serverLocator.setIdentity("(main-ClusterConnection::" +
server.toString() + ")");
serverLocator.setReconnectAttempts(0);
@@ -645,7 +645,7 @@
targetLocator.setBlockOnDurableSend(!useDuplicateDetection);
targetLocator.setBlockOnNonDurableSend(!useDuplicateDetection);
targetLocator.setClusterConnection(true);
- targetLocator.setIdentity("Cluster-connection-bridge on
ClusterConnectionImpl=" + this.toString());
+ targetLocator.setIdentity("(Cluster-connection-bridge::" +
this.toString() + ")");
targetLocator.setRetryInterval(retryInterval);
targetLocator.setMaxRetryInterval(maxRetryInterval);
Show replies by date