JBoss hornetq SVN: r10831 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:57:34 -0400 (Thu, 16 Jun 2011)
New Revision: 10831
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
Log:
tweak
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-06-17 01:56:54 UTC (rev 10830)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-06-17 01:57:34 UTC (rev 10831)
@@ -185,7 +185,7 @@
started = true;
}
- public void stop() throws Exception
+ public synchronized void stop() throws Exception
{
if (!started)
{
@@ -290,7 +290,7 @@
{
for (ClusterConnection clusterConnection : clusterConnections.values())
{
- clusterConnection.nodeAnnounced(nodeID, connectorPair);
+ clusterConnection.nodeUP(nodeID, connectorPair, last);
}
}
}
@@ -338,7 +338,8 @@
topology.sendTopology(listener);
}
- public void removeClusterTopologyListener(final ClusterTopologyListener listener,
+ // TODO: needs to be sync?
+ public synchronized void removeClusterTopologyListener(final ClusterTopologyListener listener,
final boolean clusterConnection)
{
if (clusterConnection)
13 years, 6 months
JBoss hornetq SVN: r10830 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:56:54 -0400 (Thu, 16 Jun 2011)
New Revision: 10830
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
tweaks
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-06-17 01:52:22 UTC (rev 10829)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-17 01:56:54 UTC (rev 10830)
@@ -387,6 +387,8 @@
{
return;
}
+
+ log.debug("Activating cluster connection nodeID=" + nodeUUID);
backup = false;
@@ -403,7 +405,6 @@
serverLocator.setClusterTransportConfiguration(connector);
serverLocator.setBackup(server.getConfiguration().isBackup());
serverLocator.setInitialConnectAttempts(-1);
-// serverLocator.setInitialConnectAttempts(1);
serverLocator.setClientFailureCheckPeriod(clientFailureCheckPeriod);
serverLocator.setConnectionTTL(connectionTTL);
@@ -440,6 +441,7 @@
Notification notification = new Notification(nodeUUID.toString(),
NotificationType.CLUSTER_CONNECTION_STARTED,
props);
+ log.debug("sending notification: " + notification);
managementService.sendNotification(notification);
}
}
@@ -453,7 +455,10 @@
public synchronized void nodeDown(final String nodeID)
{
- log.debug("node " + nodeID + " being considered down on cluster connection for nodeID=" + nodeUUID, new Exception ("trace"));
+ if (log.isDebugEnabled())
+ {
+ log.debug(this + " receiving nodeDown for nodeID=" + nodeID, new Exception("trace"));
+ }
if (nodeID.equals(nodeUUID.toString()))
{
return;
@@ -461,7 +466,7 @@
//Remove the flow record for that node
- MessageFlowRecord record = records.get(nodeID);
+ MessageFlowRecord record = records.remove(nodeID);
if (record != null)
{
@@ -482,13 +487,17 @@
server.getClusterManager().notifyNodeDown(nodeID);
}
+
+ // TODO: does it need to be sync?
public synchronized void nodeUP(final String nodeID,
final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
final boolean last)
{
+ log.warn(this + " WTF nodeUP nodeID=" + nodeID, new Exception ("trace"));
if (log.isDebugEnabled())
{
- log.debug("node " + nodeID + " connectionPair = " + connectorPair + " is up");
+ log.debug(this + "receiving nodeUP for nodeID=" + nodeID +
+ " connectionPair=" + connectorPair, new Exception ("trace"));
}
// discard notifications about ourselves unless its from our backup
@@ -570,9 +579,10 @@
public void nodeAnnounced(final String nodeID,
final Pair<TransportConfiguration, TransportConfiguration> connectorPair)
{
- if (isTrace)
+ log.warn(this + " WTF nodeAnnounced nodeID=" + nodeID, new Exception ("trace"));
+ if (log.isDebugEnabled())
{
- log.trace("nodeAnnouncedUp:" + nodeID);
+ log.debug(this + " received nodeAnnouncedUp for " + nodeID + ", connectorPair=" + connectorPair);
}
if (nodeID.equals(nodeUUID.toString()))
@@ -583,9 +593,9 @@
// if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
if (allowDirectConnectionsOnly && !allowableConnections.contains(connectorPair.a))
{
- if (isTrace)
+ if (log.isDebugEnabled())
{
- log.trace("Ignoring nodeUp message as it only allows direct connections");
+ log.debug("Ignoring nodeUp message as it only allows direct connections");
}
return;
}
@@ -594,18 +604,18 @@
// and empty static connectors to create bridges... ulgy!
if (serverLocator == null)
{
- if (isTrace)
+ if (log.isDebugEnabled())
{
- log.trace("Ignoring nodeUp as serverLocator==null");
+ log.debug("Ignoring nodeUp as serverLocator==null");
}
return;
}
/*we dont create bridges to backups*/
if(connectorPair.a == null)
{
- if (isTrace)
+ if (log.isDebugEnabled())
{
- log.trace("Igoring nodeup as connectorPair.a==null (backup)");
+ log.debug("Igoring nodeup as connectorPair.a==null (backup)");
}
return;
}
@@ -685,7 +695,8 @@
*/
protected Bridge createBridge(MessageFlowRecordImpl record) throws Exception
{
- ClusterConnectionBridge bridge = new ClusterConnectionBridge(serverLocator,
+ ClusterConnectionBridge bridge = new ClusterConnectionBridge(this,
+ serverLocator,
reconnectAttempts,
retryInterval,
retryIntervalMultiplier,
@@ -840,7 +851,7 @@
{
if (isTrace)
{
- log.trace("Receiving message " + message);
+ log.trace("Flow record on " + clusterConnector + " Receiving message " + message);
}
try
{
@@ -1227,6 +1238,15 @@
return records;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "ClusterConnectionImpl [nodeUUID=" + nodeUUID + ", connector=" + connector + ", address=" + address + "]";
+ }
+
public String description()
{
String out = name + " connected to\n";
13 years, 6 months
JBoss hornetq SVN: r10829 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:52:22 -0400 (Thu, 16 Jun 2011)
New Revision: 10829
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java
Log:
debug & trace
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-06-17 01:51:33 UTC (rev 10828)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-06-17 01:52:22 UTC (rev 10829)
@@ -35,6 +35,7 @@
import org.hornetq.core.postoffice.BindingType;
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.ServerMessage;
+import org.hornetq.core.server.cluster.ClusterConnection;
import org.hornetq.core.server.cluster.MessageFlowRecord;
import org.hornetq.core.server.cluster.Transformer;
import org.hornetq.utils.UUID;
@@ -53,6 +54,8 @@
private static final Logger log = Logger.getLogger(ClusterConnectionBridge.class);
private static final boolean isTrace = log.isTraceEnabled();
+
+ private final ClusterConnection clusterConnection;
private final MessageFlowRecord flowRecord;
@@ -64,11 +67,10 @@
private final SimpleString idsHeaderName;
- private final TransportConfiguration connector;
-
private final String targetNodeID;
- public ClusterConnectionBridge(final ServerLocatorInternal serverLocator,
+ public ClusterConnectionBridge(final ClusterConnection clusterConnection,
+ final ServerLocatorInternal serverLocator,
final int reconnectAttempts,
final long retryInterval,
final double retryMultiplier,
@@ -112,12 +114,13 @@
storageManager);
idsHeaderName = MessageImpl.HDR_ROUTE_TO_IDS.concat(name);
+
+ this.clusterConnection = clusterConnection;
this.targetNodeID = targetNodeID;
this.managementAddress = managementAddress;
this.managementNotificationAddress = managementNotificationAddress;
this.flowRecord = flowRecord;
- this.connector = connector;
// we need to disable DLQ check on the clustered bridges
queue.setInternalQueue(true);
@@ -156,6 +159,7 @@
private void setupNotificationConsumer() throws Exception
{
+ log.debug("Setting up notificationConsumer for " + flowRecord + " on bridge " + this.getName());
if (flowRecord != null)
{
flowRecord.reset();
@@ -164,6 +168,7 @@
{
try
{
+ log.debug("Closing notification Consumer for reopening " + notifConsumer + " on bridge " + this.getName());
notifConsumer.close();
notifConsumer = null;
@@ -224,6 +229,11 @@
ClientProducer prod = session.createProducer(managementAddress);
+ if (log.isDebugEnabled())
+ {
+ log.debug("Cluster connetion bridge on " + clusterConnection + " requesting information on queues");
+ }
+
prod.send(message);
}
}
@@ -242,6 +252,7 @@
protected void failed(final boolean permanently)
{
+ log.debug("Cluster Bridge " + this.getName() + " failed, permanently=" + permanently);
super.fail(permanently);
if (permanently)
13 years, 6 months
JBoss hornetq SVN: r10828 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:51:33 -0400 (Thu, 16 Jun 2011)
New Revision: 10828
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
Log:
tweaks
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-06-17 01:50:19 UTC (rev 10827)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-06-17 01:51:33 UTC (rev 10828)
@@ -771,10 +771,12 @@
{
}
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("Scheduling retry for bridge " + this.name + "in " + milliseconds + " milliseconds");
+ }
- csf = null;
- session = null;
-
futureScheduledReconnection = scheduledExecutor.schedule(new FutureConnectRunnable(), milliseconds, TimeUnit.MILLISECONDS);
}
@@ -795,7 +797,7 @@
if (csf != null)
{
- csf.close();
+ csf.cleanup();
}
synchronized (BridgeImpl.this)
@@ -810,6 +812,8 @@
queue.removeConsumer(BridgeImpl.this);
+ internalCancelReferences();
+
log.info("stopped bridge " + name);
}
catch (Exception e)
13 years, 6 months
JBoss hornetq SVN: r10827 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/netty.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:50:19 -0400 (Thu, 16 Jun 2011)
New Revision: 10827
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/netty/NettyConnector.java
Log:
debug & tracing
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/netty/NettyConnector.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/netty/NettyConnector.java 2011-06-17 01:50:04 UTC (rev 10826)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/netty/NettyConnector.java 2011-06-17 01:50:19 UTC (rev 10827)
@@ -256,6 +256,28 @@
this.scheduledThreadPool = scheduledThreadPool;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "NettyConnector [host=" + host +
+ ", port=" +
+ port +
+ ", httpEnabled=" +
+ httpEnabled +
+ ", useServlet=" +
+ useServlet +
+ ", servletPath=" +
+ servletPath +
+ ", sslEnabled=" +
+ sslEnabled +
+ ", useNio=" +
+ useNio +
+ "]";
+ }
+
public synchronized void start()
{
if (channelFactory != null)
13 years, 6 months
JBoss hornetq SVN: r10826 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:50:04 -0400 (Thu, 16 Jun 2011)
New Revision: 10826
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnection.java
Log:
debug & tracing
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnection.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnection.java 2011-06-17 01:49:48 UTC (rev 10825)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnection.java 2011-06-17 01:50:04 UTC (rev 10826)
@@ -169,4 +169,15 @@
public void removeReadyListener(ReadyListener listener)
{
}
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "InVMConnection [serverID=" + serverID + ", id=" + id + "]";
+ }
+
+
}
13 years, 6 months
JBoss hornetq SVN: r10825 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:49:48 -0400 (Thu, 16 Jun 2011)
New Revision: 10825
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java
Log:
debug & tracing
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java 2011-06-17 01:49:34 UTC (rev 10824)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/SubscribeClusterTopologyUpdatesMessage.java 2011-06-17 01:49:48 UTC (rev 10825)
@@ -66,6 +66,17 @@
clusterConnection = buffer.readBoolean();
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "SubscribeClusterTopologyUpdatesMessage [clusterConnection=" + clusterConnection +
+ ", toString()=" +
+ super.toString() +
+ "]";
+ }
// Package protected ---------------------------------------------
13 years, 6 months
JBoss hornetq SVN: r10824 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:49:34 -0400 (Thu, 16 Jun 2011)
New Revision: 10824
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java
Log:
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java 2011-06-17 01:49:13 UTC (rev 10823)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/wireformat/NodeAnnounceMessage.java 2011-06-17 01:49:34 UTC (rev 10824)
@@ -92,7 +92,23 @@
connector.decode(buffer);
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "NodeAnnounceMessage [backup=" + backup +
+ ", connector=" +
+ connector +
+ ", nodeID=" +
+ nodeID +
+ ", toString()=" +
+ super.toString() +
+ "]";
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
13 years, 6 months
JBoss hornetq SVN: r10823 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:49:13 -0400 (Thu, 16 Jun 2011)
New Revision: 10823
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java
Log:
debug & tracing
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java 2011-06-17 01:48:56 UTC (rev 10822)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java 2011-06-17 01:49:13 UTC (rev 10823)
@@ -145,9 +145,28 @@
this.creationTime = System.currentTimeMillis();
}
+
+
+
// RemotingConnection implementation
// ------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "RemotingConnectionImpl [clientID=" + clientID +
+ ", decoder=" +
+ decoder +
+ ", nodeID=" +
+ nodeID +
+ ", transportConnection=" +
+ transportConnection +
+ "]";
+ }
+
public Connection getTransportConnection()
{
return transportConnection;
13 years, 6 months
JBoss hornetq SVN: r10822 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-16 21:48:56 -0400 (Thu, 16 Jun 2011)
New Revision: 10822
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/PacketImpl.java
Log:
debug & tracing
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/PacketImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/PacketImpl.java 2011-06-17 01:48:36 UTC (rev 10821)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/PacketImpl.java 2011-06-17 01:48:56 UTC (rev 10822)
@@ -305,7 +305,7 @@
protected String getParentString()
{
- return "PACKET[type=" + type + ", channelID=" + channelID;
+ return "PACKET[type=" + type + ", channelID=" + channelID + ", packetObject=" + this.getClass().getSimpleName();
}
// Protected -----------------------------------------------------
13 years, 6 months