JBoss hornetq SVN: r11046 - in branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core: postoffice and 3 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-26 18:58:42 -0400 (Tue, 26 Jul 2011)
New Revision: 11046
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/postoffice/QueueInfo.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
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/ClusterConnectionImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
Log:
test 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-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -1400,7 +1400,7 @@
if (log.isTraceEnabled())
{
- log.trace("Disconnect being called on client:" + msg);
+ log.trace("XXX Disconnect being called on client:" + msg, new Exception ("trace"));
}
closeExecutor.execute(new Runnable()
@@ -1410,6 +1410,10 @@
public void run()
{
SimpleString nodeID = msg.getNodeID();
+ if (log.isTraceEnabled())
+ {
+ log.trace("XXX notify nodeID=" + msg.getNodeID() + " on serverLocator=" + serverLocator);
+ }
if (nodeID != null)
{
serverLocator.notifyNodeDown(msg.getNodeID().toString());
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-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -644,7 +644,7 @@
}
while (retry);
- if (ha)
+ if (ha || clusterConnection)
{
long toWait = 30000;
long start = System.currentTimeMillis();
@@ -1164,10 +1164,19 @@
{
boolean removed = false;
- if (!ha)
+ if (!clusterConnection && !ha)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("ignoring notifyNodeDown=" + nodeID + " as isHA=false");
+ }
return;
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX " + this + "::Notify nodeID=" + nodeID + " as being down");
+ }
removed = topology.removeMember(nodeID);
@@ -1200,8 +1209,12 @@
final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
final boolean last)
{
- if (!ha)
+ if (!clusterConnection && !ha)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug(this + "::Ignoring notifyNodeUp for " + nodeID + " connectorPair=" + connectorPair + ", since ha=false and clusterConnection=false");
+ }
return;
}
@@ -1274,7 +1287,7 @@
this.initialConnectors[count++] = entry.getConnector();
}
- if (ha && clusterConnection && !receivedTopology && initialConnectors.length > 0)
+ if (clusterConnection && !receivedTopology && initialConnectors.length > 0)
{
// FIXME the node is alone in the cluster. We create a connection to the new node
// to trigger the node notification to form the cluster.
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-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -110,9 +110,9 @@
public synchronized boolean removeMember(String nodeId)
{
TopologyMember member = topology.remove(nodeId);
- if (debug)
+ if (log.isDebugEnabled())
{
- log.debug("Removing member " + member);
+ log.debug("XXX Removing member " + member, new Exception ("trace"));
}
return (member != null);
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/QueueInfo.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/QueueInfo.java 2011-07-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/QueueInfo.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -129,4 +129,30 @@
{
numberOfConsumers--;
}
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "QueueInfo [routingName=" + routingName +
+ ", clusterName=" +
+ clusterName +
+ ", address=" +
+ address +
+ ", filterString=" +
+ filterString +
+ ", id=" +
+ id +
+ ", filterStrings=" +
+ filterStrings +
+ ", numberOfConsumers=" +
+ numberOfConsumers +
+ ", distance=" +
+ distance +
+ "]";
+ }
+
+
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-07-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -753,6 +753,12 @@
{
throw new IllegalStateException("Cannot find queue " + queueName);
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX PostOffice.sendQueueInfoToQueue on server=" + this.server + ", queueName=" + queueName + " and address=" + address,
+ new Exception ("trace"));
+ }
Queue queue = (Queue)binding.getBindable();
@@ -769,6 +775,10 @@
for (QueueInfo info : queueInfos.values())
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX QueueInfo on sendQueueInfoToQueue = " + info);
+ }
if (info.getAddress().startsWith(address))
{
message = createQueueInfoMessage(NotificationType.BINDING_ADDED, queueName);
@@ -789,7 +799,7 @@
message = createQueueInfoMessage(NotificationType.CONSUMER_CREATED, queueName);
message.putStringProperty(ManagementHelper.HDR_ADDRESS, info.getAddress());
- message.putStringProperty(ManagementHelper.HDR_CLUSTER_NAME, info.getClusterName());
+ message.putStringProperty(ManagementHelper.HDR_CLUSTER_NAME, info.getClusterName());
message.putStringProperty(ManagementHelper.HDR_ROUTING_NAME, info.getRoutingName());
message.putIntProperty(ManagementHelper.HDR_DISTANCE, info.getDistance());
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-07-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -24,6 +24,7 @@
import org.hornetq.api.core.client.ClusterTopologyListener;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.core.config.Configuration;
+import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.Channel;
import org.hornetq.core.protocol.core.ChannelHandler;
import org.hornetq.core.protocol.core.CoreRemotingConnection;
@@ -49,6 +50,10 @@
*/
public class CoreProtocolManager implements ProtocolManager
{
+ private static final Logger log = Logger.getLogger(CoreProtocolManager.class);
+
+ private static final boolean isTrace = log.isTraceEnabled();
+
private final HornetQServer server;
private final List<Interceptor> interceptors;
@@ -147,6 +152,10 @@
{
pair = new Pair<TransportConfiguration, TransportConfiguration>(msg.getConnector(), null);
}
+ if (isTrace)
+ {
+ log.trace("XXX Server " + server + " receiving nodeUp from NodeID=" + msg.getNodeID() + ", pair=" + pair);
+ }
server.getClusterManager().notifyNodeUp(msg.getNodeID(), pair, false, true);
}
}
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-07-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -135,7 +135,7 @@
if (log.isDebugEnabled())
{
- log.debug("Setting up bridge between " + clusterConnection.getConnector() + " and " + targetLocator, new Exception ("trace"));
+ log.debug("XXX Setting up bridge between " + clusterConnection.getConnector() + " and " + targetLocator, new Exception ("trace"));
}
}
@@ -247,7 +247,7 @@
ClientMessage message = session.createMessage(false);
- System.out.println("Requesting sendQueueInfoToQueue");
+ log.debug("XXX Requesting sendQueueInfoToQueue through " + this, new Exception ("trace"));
ManagementHelper.putOperationInvocation(message,
ResourceNames.CORE_SERVER,
"sendQueueInfoToQueue",
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-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -542,6 +542,11 @@
/*we dont create bridges to backups*/
if(connectorPair.a == null)
{
+ if (isTrace)
+ {
+ log.trace(this + " ignoring call with nodeID=" + nodeID +
+ ", connectorPair=" + connectorPair + ", last=" + last);
+ }
return;
}
@@ -553,6 +558,10 @@
if (record == null)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug(this + "::Creating record for nodeID=" + nodeID + ", connectorPair=" + connectorPair);
+ }
// New node - create a new flow record
@@ -575,6 +584,13 @@
createNewRecord(nodeID, connectorPair.a, queueName, queue, true);
}
+ else
+ {
+ if (isTrace)
+ {
+ log.trace ("XXX " + this + " ignored nodeUp record for " + connectorPair + " on nodeID=" + nodeID + " as the record already existed");
+ }
+ }
}
catch (Exception e)
{
@@ -595,7 +611,7 @@
if (log.isDebugEnabled())
{
- log.debug("creating record between " + this.connector + " and " + connector + bridge);
+ log.debug("XXX creating record between " + this.connector + " and " + connector + bridge);
}
record.setBridge(bridge);
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-07-26 00:13:47 UTC (rev 11045)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-07-26 22:58:42 UTC (rev 11046)
@@ -20,6 +20,7 @@
import java.lang.reflect.Array;
import java.net.InetAddress;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -262,6 +263,8 @@
{
return;
}
+
+ log.info("XXX " + this + "::removing nodeID=" + nodeID);
boolean removed = topology.removeMember(nodeID);
@@ -280,16 +283,20 @@
final boolean last,
final boolean nodeAnnounce)
{
- TopologyMember member = new TopologyMember(connectorPair);
- boolean updated = topology.addMember(nodeID, member);
-
if (log.isDebugEnabled())
{
- log.debug(this + "::NodeUp " + nodeID + connectorPair);
+ log.debug("XXX " + this + "::NodeUp " + nodeID + connectorPair + ", nodeAnnounce=" + nodeAnnounce);
}
+ TopologyMember member = new TopologyMember(connectorPair);
+ boolean updated = topology.addMember(nodeID, member);
+
if (!updated)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX " + this + " ignored notifyNodeUp on nodeID=" + nodeID + " pair=" + connectorPair + " as the topology already knew about it");
+ }
return;
}
@@ -298,12 +305,27 @@
listener.nodeUP(nodeID, member.getConnector(), last);
}
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX " + this + " received notifyNodeUp nodeID=" + nodeID + " connectorPair=" + connectorPair +
+ ", nodeAnnounce=" + nodeAnnounce + ", last=" + last);
+ }
+
// if this is a node being announced we are hearing it direct from the nodes CM so need to inform our cluster
// connections.
if (nodeAnnounce)
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("Informing " + nodeID + " to " + clusterConnections.toString());
+ }
for (ClusterConnection clusterConnection : clusterConnections.values())
{
+ if (log.isTraceEnabled())
+ {
+ log.trace("XXX " + this + " information clusterConnection=" + clusterConnection +
+ " nodeID=" + nodeID + " connectorPair=" + connectorPair + " last=" + last);
+ }
clusterConnection.nodeUP(nodeID, connectorPair, last);
}
}
@@ -828,7 +850,7 @@
if (log.isDebugEnabled())
{
- log.debug("XXX " + this + " defining cluster connection towards " + tcConfigs);
+ log.debug("XXX " + this + " defining cluster connection towards " + Arrays.toString(tcConfigs));
}
clusterConnection = new ClusterConnectionImpl(tcConfigs,
14 years, 5 months
JBoss hornetq SVN: r11045 - branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-25 20:13:47 -0400 (Mon, 25 Jul 2011)
New Revision: 11045
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
Log:
tweak
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-07-25 23:04:40 UTC (rev 11044)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-07-26 00:13:47 UTC (rev 11045)
@@ -128,7 +128,7 @@
stopServers(0, 1);
}
- public void testLoop() throws Exception
+ public void _testLoop() throws Exception
{
for (int i = 0 ; i < 100; i++)
{
14 years, 5 months
JBoss hornetq SVN: r11044 - in branches/Branch_2_2_EAP_cluster_clean2: src/main/org/hornetq/core/postoffice/impl and 4 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-25 19:04:40 -0400 (Mon, 25 Jul 2011)
New Revision: 11044
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/postoffice/impl/PostOfficeImpl.java
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/remoting/server/impl/RemotingServiceImpl.java
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/ClusterManagerImpl.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
Log:
just adding 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-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -1131,66 +1131,69 @@
}
}
// if connection fails we can try the backup in case it has come live
- if (connector == null && backupConfig != null)
+ if (connector == null)
{
- if (isDebug)
+ if (backupConfig != null)
{
- log.debug("Trying backup config = " + backupConfig);
- }
- ConnectorFactory backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName());
- connector = backupConnectorFactory.createConnector(backupConfig.getParams(),
- handler,
- this,
- closeExecutor,
- threadPool,
- scheduledThreadPool);
- if (connector != null)
- {
- connector.start();
-
- tc = connector.createConnection();
-
- if (tc == null)
+ if (isDebug)
{
- if (isDebug)
+ log.debug("Trying backup config = " + backupConfig);
+ }
+ ConnectorFactory backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName());
+ connector = backupConnectorFactory.createConnector(backupConfig.getParams(),
+ handler,
+ this,
+ closeExecutor,
+ threadPool,
+ scheduledThreadPool);
+ if (connector != null)
+ {
+ connector.start();
+
+ tc = connector.createConnection();
+
+ if (tc == null)
{
- log.debug("Backup is not active yet");
+ if (isDebug)
+ {
+ log.debug("Backup is not active yet");
+ }
+
+ try
+ {
+ connector.close();
+ }
+ catch (Throwable t)
+ {
+ }
+
+ connector = null;
}
-
- try
+ else
{
- connector.close();
+ /*looks like the backup is now live, lets use that*/
+
+ if (isDebug)
+ {
+ log.debug("Connected to the backup at " + backupConfig);
+ }
+
+ connectorConfig = backupConfig;
+
+ backupConfig = null;
+
+ connectorFactory = backupConnectorFactory;
}
- catch (Throwable t)
- {
- }
-
- connector = null;
}
- else
+ }
+ else
+ {
+ if (isTrace)
{
- /*looks like the backup is now live, lets use that*/
-
- if (isDebug)
- {
- log.debug("Connected to the backup at " + backupConfig);
- }
-
- connectorConfig = backupConfig;
-
- backupConfig = null;
-
- connectorFactory = backupConnectorFactory;
+ log.trace("No Backup configured!", new Exception("trace"));
}
}
}
- else
- {
- if (isTrace)
- {
- log.trace("No Backup configured!", new Exception("trace"));
- }
- }
}
catch (Exception e)
{
@@ -1288,6 +1291,11 @@
}
}
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("returning " + connection);
+ }
return connection;
}
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-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -1400,6 +1400,11 @@
}
}
});
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX Returning " + csf + " after " + retryNumber + " retries on StaticConnector " + ServerLocatorImpl.this);
+ }
return csf;
}
@@ -1419,13 +1424,16 @@
}
catch (Exception e)
{
+ log.warn("XXX " + e.getMessage(), e);
throw new HornetQException(HornetQException.NOT_CONNECTED, "Failed to connect to any static connectors", e);
}
if (csf == null && !closed)
{
+ log.warn("XXX Failed to connecto to any static connector, throwing exception now");
throw new HornetQException(HornetQException.NOT_CONNECTED, "Failed to connect to any static connectors");
}
+ log.warn("Returning " + csf + " on " + ServerLocatorImpl.this);
return csf;
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -473,7 +473,8 @@
if (isTrace)
{
- log.trace("Seding notification for addBinding " + binding + " from server " + server);
+ //log.trace("Sending notification for addBinding " + binding + " from server " + server);
+ log.trace("XXX Sending notification for addBinding " + binding + " from server " + server, new Exception("trace"));
}
managementService.sendNotification(new Notification(uid, NotificationType.BINDING_ADDED, props));
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-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -48,6 +48,8 @@
// ------------------------------------------------------------------------------------
private static final Logger log = Logger.getLogger(RemotingConnectionImpl.class);
+
+ private static final boolean isTrace = log.isTraceEnabled();
// Static
// ---------------------------------------------------------------------------------------
@@ -439,6 +441,11 @@
try
{
final Packet packet = decoder.decode(buffer);
+
+ if (isTrace)
+ {
+ log.trace("handling packet " + packet);
+ }
if (packet.isAsyncExec() && executor != null)
{
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2011-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -404,7 +404,7 @@
if (isTrace)
{
- log.trace("Connection removed " + connectionID, new Exception ("trace"));
+ log.trace("Connection removed " + connectionID + " from server " + this.server, new Exception ("trace"));
}
ConnectionEntry conn = connections.get(connectionID);
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-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -321,7 +321,7 @@
serverLocator.removeClusterTopologyListener(this);
}
- log.debug("Cluster connection being stopped for node" + nodeUUID);
+ log.debug("Cluster connection being stopped for node" + nodeUUID + ", server = " + this.server + " serverLocator = " + serverLocator );
synchronized (this)
{
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-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -788,7 +788,13 @@
{
ClusterManagerImpl.log.warn("No discovery group with name '" + config.getDiscoveryGroupName() +
"'. The cluster connection will not be deployed.");
+ return;
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX " + this + " Starting a Discovery Group Cluster Connection, name=" + config.getDiscoveryGroupName() + ", dg=" + dg);
+ }
clusterConnection = new ClusterConnectionImpl(dg,
connector,
@@ -819,6 +825,11 @@
{
TransportConfiguration[] tcConfigs = config.getStaticConnectors() != null ? connectorNameListToArray(config.getStaticConnectors())
: null;
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX " + this + " defining cluster connection towards " + tcConfigs);
+ }
clusterConnection = new ClusterConnectionImpl(tcConfigs,
connector,
@@ -850,6 +861,10 @@
clusterConnections.put(config.getName(), clusterConnection);
+ if (log.isDebugEnabled())
+ {
+ log.debug("XXX ClusterConnection.start at " + clusterConnection, new Exception ("trace"));
+ }
clusterConnection.start();
if (backup)
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -117,6 +117,7 @@
@Override
protected void tearDown() throws Exception
{
+ log.info("#test tearDown");
for (ServerLocator locator : locators)
{
try
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-07-25 15:10:19 UTC (rev 11043)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-07-25 23:04:40 UTC (rev 11044)
@@ -52,6 +52,7 @@
@Override
protected void tearDown() throws Exception
{
+ log.info("#test tearDown");
closeAllConsumers();
closeAllSessionFactories();
@@ -126,6 +127,17 @@
stopServers(0, 1);
}
+
+ public void testLoop() throws Exception
+ {
+ for (int i = 0 ; i < 100; i++)
+ {
+ log.info("#test " + i);
+ testStopStart();
+ tearDown();
+ setUp();
+ }
+ }
public void testStopStart() throws Exception
{
@@ -157,15 +169,17 @@
log.info("*********** Stopping server 1");
stopServers(1);
log.info("*********** Stopped server 1");
-
- Thread.sleep(1000);
System.out.println(clusterDescription(servers[0]));
+
+ Thread.sleep(5000);
+ log.info ("********* Starting server 1");
startServers(1);
- System.out.println(clusterDescription(servers[0]));
- System.out.println(clusterDescription(servers[1]));
+ log.info ("********* Describing servers");
+ log.info(servers[0].describe());
+ log.info(servers[1].describe());
setupSessionFactory(1, isNetty());
14 years, 5 months
JBoss hornetq SVN: r11043 - branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2011-07-25 11:10:19 -0400 (Mon, 25 Jul 2011)
New Revision: 11043
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
Log:
Revert changes to expected bindings. Current suspition is that this is caused
by backup nodes having different nodeID from their servers.
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-07-25 15:07:19 UTC (rev 11042)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-07-25 15:10:19 UTC (rev 11043)
@@ -368,8 +368,8 @@
waitForBindings(2, QUEUES_TESTADDRESS, 1, 1, true);
// live nodes
- waitForBindings(1, QUEUES_TESTADDRESS, 2, 1, false);
- waitForBindings(2, QUEUES_TESTADDRESS, 2, 1, false);
+ waitForBindings(1, QUEUES_TESTADDRESS, 1, 1, false);
+ waitForBindings(2, QUEUES_TESTADDRESS, 1, 1, false);
send(1, QUEUES_TESTADDRESS, 10, false, null);
verifyReceiveRoundRobinInSomeOrder(true, 10, 1, 2);
@@ -385,7 +385,7 @@
waitForBindings(4, QUEUES_TESTADDRESS, 1, 1, true);
// live nodes
- waitForBindings(2, QUEUES_TESTADDRESS, 2, 1, false);
+ waitForBindings(2, QUEUES_TESTADDRESS, 1, 1, false);
// activated backup nodes
waitForBindings(4, QUEUES_TESTADDRESS, 1, 1, false);
@@ -401,7 +401,7 @@
// live nodes
waitForBindings(2, QUEUES_TESTADDRESS, 1, 1, true);
// live nodes
- waitForBindings(2, QUEUES_TESTADDRESS, 2, 0, false);
+ waitForBindings(2, QUEUES_TESTADDRESS, 1, 0, false);
send(2, QUEUES_TESTADDRESS, 10, false, null);
verifyReceiveRoundRobinInSomeOrder(true, 10, 2);
14 years, 5 months
JBoss hornetq SVN: r11042 - in branches/HORNETQ-720_Replication: hornetq-core/src/main/java/org/hornetq/core and 5 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-07-25 11:07:19 -0400 (Mon, 25 Jul 2011)
New Revision: 11042
Removed:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/logging/
branches/HORNETQ-720_Replication/hornetq-rest/hornetq-rest/src/main/java/org/jboss/
branches/HORNETQ-720_Replication/hornetq-rest/hornetq-rest/src/test/java/org/jboss/resteasy/
branches/HORNETQ-720_Replication/tests/performance-tests/src/test/java/org/hornetq/tests/performance/persistence/
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/client/
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/remoting/
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/version/
Modified:
branches/HORNETQ-720_Replication/
Log:
merge from main
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-10916
+ /trunk:10878-11041
14 years, 5 months
JBoss hornetq SVN: r11040 - in trunk: hornetq-rest/hornetq-rest/src/test/java/org/jboss and 3 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-07-25 05:15:49 -0400 (Mon, 25 Jul 2011)
New Revision: 11040
Removed:
trunk/hornetq-rest/hornetq-rest/src/main/java/org/jboss/
trunk/hornetq-rest/hornetq-rest/src/test/java/org/jboss/resteasy/
trunk/tests/performance-tests/src/test/java/org/hornetq/tests/performance/persistence/
trunk/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/client/
trunk/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/remoting/
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/version/
Log:
Remove a number of empty directories
14 years, 5 months
JBoss hornetq SVN: r11039 - branches/Branch_2_2_EAP_cluster_clean2.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-24 01:35:06 -0400 (Sun, 24 Jul 2011)
New Revision: 11039
Modified:
branches/Branch_2_2_EAP_cluster_clean2/build-hornetq.xml
Log:
tweak
Modified: branches/Branch_2_2_EAP_cluster_clean2/build-hornetq.xml
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/build-hornetq.xml 2011-07-24 04:22:56 UTC (rev 11038)
+++ branches/Branch_2_2_EAP_cluster_clean2/build-hornetq.xml 2011-07-24 05:35:06 UTC (rev 11039)
@@ -44,6 +44,7 @@
<!-- Version properties are read from hornetq-version.properties instead of duplicating them here -->
<property file="src/config/common/hornetq-version.properties"/>
<property name="hornetq.version.revision" value="0" />
+ <property name="twitter.consumerKey" value="null"/>
<property name="hornetq.version.svnurl" value="https://svn.jboss.org/repos/hornetq/branches/Branch_2_2_EAP"/>
<property name="hornetq.version.string"
value="${hornetq.version.majorVersion}.${hornetq.version.minorVersion}.${hornetq.version.microVersion}.${hornetq.version.versionSuffix} (${hornetq.version.versionName}, ${hornetq.version.incrementingVersion})"/>
14 years, 5 months
JBoss hornetq SVN: r11038 - branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-24 00:22:56 -0400 (Sun, 24 Jul 2011)
New Revision: 11038
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
Log:
tweak
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-07-23 00:26:23 UTC (rev 11037)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-07-24 04:22:56 UTC (rev 11038)
@@ -67,13 +67,18 @@
// incoming
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
public static TestSuite suite()
{
TestSuite suite = new TestSuite(TwitterTest.class.getName() + " testsuite");
- if (TWITTER_CONSUMER_KEY != null)
+ if (TWITTER_CONSUMER_KEY != null && !TWITTER_CONSUMER_KEY.equals("null"))
{
suite.addTestSuite(TwitterTest.class);
}
14 years, 5 months
JBoss hornetq SVN: r11037 - branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-07-22 20:26:23 -0400 (Fri, 22 Jul 2011)
New Revision: 11037
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
Log:
duh!
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-07-22 21:35:04 UTC (rev 11036)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-07-23 00:26:23 UTC (rev 11037)
@@ -73,7 +73,7 @@
{
TestSuite suite = new TestSuite(TwitterTest.class.getName() + " testsuite");
- if (AIOSequentialFileFactory.isSupported())
+ if (TWITTER_CONSUMER_KEY != null)
{
suite.addTestSuite(TwitterTest.class);
}
14 years, 5 months