[jboss-cvs] JBoss Messaging SVN: r3193 - trunk/src/main/org/jboss/jms/server/endpoint.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 16 16:23:10 EDT 2007
Author: timfox
Date: 2007-10-16 16:23:10 -0400 (Tue, 16 Oct 2007)
New Revision: 3193
Modified:
trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
Log:
logging
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2007-10-16 19:13:53 UTC (rev 3192)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2007-10-16 20:23:10 UTC (rev 3193)
@@ -93,6 +93,7 @@
import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
/**
@@ -178,6 +179,9 @@
private Object waitLock = new Object();
+ //debug
+ private SynchronizedInt toDeliverCount = new SynchronizedInt(0);
+
// Constructors ---------------------------------------------------------------------------------
ServerSessionEndpoint(String sessionID, ServerConnectionEndpoint connectionEndpoint) throws Exception
@@ -907,6 +911,8 @@
while (iter.hasNext())
{
toDeliver.put(iter.next());
+
+ this.toDeliverCount.increment();
}
}
@@ -1057,6 +1063,8 @@
{
toDeliver.take();
+ this.toDeliverCount.decrement();
+
performDelivery(dr.del.getReference(), dr.deliveryID, dr.getConsumer());
delivered = true;
@@ -1290,7 +1298,10 @@
if (toWait <= 0)
{
//Clear toDeliver
- while (toDeliver.poll(0) != null) {}
+ while (toDeliver.poll(0) != null)
+ {
+ this.toDeliverCount.decrement();
+ }
log.warn("Timed out waiting for response to arrive");
}
@@ -1359,12 +1370,16 @@
//producer in flight (since np don't need to be replicated)
toDeliver.put(rec);
+ this.toDeliverCount.increment();
+
//Race check (there's a small chance the message in the queue got removed between the empty check
//and the put so we do another check:
if (toDeliver.peek() == rec)
{
toDeliver.take();
+ this.toDeliverCount.decrement();
+
performDelivery(delivery.getReference(), deliveryId, consumer);
}
}
@@ -1388,6 +1403,8 @@
toDeliver.put(rec);
+ this.toDeliverCount.increment();
+
postOffice.sendReplicateDeliveryMessage(consumer.getQueueName(), id,
delivery.getReference().getMessage().getMessageID(),
deliveryId, true, false);
@@ -1404,6 +1421,8 @@
performDelivery(delivery.getReference(), deliveryId, consumer);
}
}
+
+ log.info("del count " + this.toDeliverCount.get());
}
More information about the jboss-cvs-commits
mailing list