Author: clebert.suconic(a)jboss.com
Date: 2011-06-20 00:49:56 -0400 (Mon, 20 Jun 2011)
New Revision: 10853
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.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/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/impl/ServerConsumerImpl.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/SimpleSymmetricClusterTest.java
Log:
Tweaks for debugging
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java 2011-06-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -135,6 +135,11 @@
{
return BindingType.LOCAL_QUEUE;
}
+
+ public void close() throws Exception
+ {
+ queue.close();
+ }
/* (non-Javadoc)
* @see java.lang.Object#toString()
@@ -142,12 +147,16 @@
@Override
public String toString()
{
- return "LocalQueueBinding [address=" + address + ", name=" +
name + ", filter=" + filter + "]";
+ return "LocalQueueBinding [address=" + address +
+ ", queue=" +
+ queue +
+ ", filter=" +
+ filter +
+ ", name=" +
+ name +
+ ", clusterName=" +
+ clusterName +
+ "]";
}
-
- public void close() throws Exception
- {
- queue.close();
- }
}
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-06-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -470,6 +470,8 @@
}
String uid = UUIDGenerator.getInstance().generateStringUUID();
+
+ System.out.println("Seding notification for addBinding " + binding);
managementService.sendNotification(new Notification(uid,
NotificationType.BINDING_ADDED, props));
}
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-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -112,6 +112,8 @@
password,
activated,
storageManager);
+
+ System.out.println("ClusterConnectionBridge");
idsHeaderName = MessageImpl.HDR_ROUTE_TO_IDS.concat(name);
@@ -221,6 +223,7 @@
ClientMessage message = session.createMessage(false);
+ System.out.println("Requesting sendQueueInfoToQueue");
ManagementHelper.putOperationInvocation(message,
ResourceNames.CORE_SERVER,
"sendQueueInfoToQueue",
@@ -241,6 +244,7 @@
@Override
protected void afterConnect() throws Exception
{
+ System.out.println("afterConnect");
setupNotificationConsumer();
}
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-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -493,7 +493,6 @@
final Pair<TransportConfiguration,
TransportConfiguration> connectorPair,
final boolean last)
{
- log.warn(this + " WTF nodeUP nodeID=" + nodeID, new Exception
("trace"));
if (log.isDebugEnabled())
{
log.debug(this + "receiving nodeUP for nodeID=" + nodeID +
@@ -1026,6 +1025,11 @@
{
log.trace("Adding binding " + clusterName + " into " +
ClusterConnectionImpl.this);
}
+
+ synchronized (System.err)
+ {
+ new Exception("Adding binding " + clusterName + " into "
+ ClusterConnectionImpl.this).printStackTrace(System.out);
+ }
bindings.put(clusterName, binding);
@@ -1055,6 +1059,8 @@
}
SimpleString clusterName =
message.getSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME);
+
+ System.out.println("Removing clusterName=" + clusterName + " on
" + ClusterConnectionImpl.this);
removeBinding(clusterName);
}
@@ -1096,10 +1102,15 @@
SimpleString filterString =
message.getSimpleStringProperty(ManagementHelper.HDR_FILTERSTRING);
RemoteQueueBinding binding = bindings.get(clusterName);
+
+ synchronized (System.err)
+ {
+ new Exception("Looking for consumer on " + clusterName + "
binding = " + binding).printStackTrace(System.out);
+ }
if (binding == null)
{
- throw new IllegalStateException("Cannot find binding for " +
clusterName);
+ throw new IllegalStateException("Cannot find binding for " +
clusterName + " on " + ClusterConnectionImpl.this);
}
binding.addConsumer(filterString);
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2011-06-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -262,7 +262,7 @@
// the updateDeliveryCount would still be updated after c
if (strictUpdateDeliveryCount)
{
- if (ref.getMessage().isDurable() && ref.getQueue().isDurable()
&& !ref.getQueue().isInternalQueue())
+ if (ref.getMessage().isDurable() && ref.getQueue().isDurable()
&& !ref.getQueue().isInternalQueue() && !ref.isPaged())
{
storageManager.updateDeliveryCount(ref);
}
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-06-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -319,7 +319,7 @@
// Sending thread dump into junit report.. trying to get some information about the
server case the binding didn't
// arrive
- System.out.println(UnitTestCase.threadDump(msg));
+ // System.out.println(UnitTestCase.threadDump(msg));
Bindings bindings = po.getBindingsForAddress(new SimpleString(address));
@@ -1845,7 +1845,7 @@
* This is to avoid split brain on startup
* */
// TODO: Do we really need this?
- Thread.sleep(500);
+ Thread.sleep(1000);
}
for (int node : nodes)
{
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-18
04:40:18 UTC (rev 10852)
+++
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-20
04:49:56 UTC (rev 10853)
@@ -77,7 +77,7 @@
public void tearDown() throws Exception
{
- stopServers(0, 1);
+ stopServers(0, 1, 2);
super.tearDown();
}
@@ -110,16 +110,25 @@
setupSessionFactory(1, isNetty());
setupSessionFactory(2, isNetty());
+ //Thread.sleep(1500);
+
createQueue(0, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
createQueue(1, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
createQueue(2, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
addConsumer(0, 0, "queue0", null);
+ //Thread.sleep(1500);
addConsumer(1, 1, "queue0", null);
- addConsumer(2, 1, "queue0", null);
+ //Thread.sleep(1500);
+ addConsumer(2, 2, "queue0", null);
+ //Thread.sleep(1500);
waitForBindings(0, "queues.testaddress", 1, 1, true);
waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
waitForBindings(0, "queues.testaddress", 2, 2, false);
waitForBindings(1, "queues.testaddress", 2, 2, false);