[jboss-cvs] JBoss Messaging SVN: r5216 - in branches/Branch_JBMESSAGING_1416: tests/src/org/jboss/test/messaging/jms and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 30 03:11:17 EDT 2008
Author: gaohoward
Date: 2008-10-30 03:11:17 -0400 (Thu, 30 Oct 2008)
New Revision: 5216
Modified:
branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroup.java
branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroupMonitor.java
branches/Branch_JBMESSAGING_1416/tests/src/org/jboss/test/messaging/jms/OrderingGroupConnectionConsumerTest.java
Log:
JBMESSAGING-1416
Modified: branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/ChannelSupport.java
===================================================================
--- branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/ChannelSupport.java 2008-10-30 06:55:52 UTC (rev 5215)
+++ branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/ChannelSupport.java 2008-10-30 07:11:17 UTC (rev 5216)
@@ -225,8 +225,6 @@
ref = ref.copy();
monitor.registerMessage(ref, tx);
-
- dlog("---registering msg: ", ref);
try
{
@@ -593,7 +591,7 @@
*
* @see org.jboss.messaging.core.contract.Channel#deliver()
*/
- /*debug use, delete them!!!*/
+ /*debug use, delete them!!!
private void dlog(String lgmsg)
{
log.error("(*)-" + lgmsg);
@@ -602,7 +600,7 @@
{
dlog(lgmsg + this.getRefText(r));
}
- /*debug*/
+ debug*/
protected void deliverInternal()
{
if (trace) { log.trace(this + " was prompted delivery"); }
@@ -726,7 +724,6 @@
break;
}
}
- log.error("======delever end==========");
}
catch (Throwable t)
{
@@ -832,18 +829,15 @@
}
}
- synchronized (lock)
+ if (OrderingGroupMonitor.isOrderingGroupMessage(d.getReference()))
{
- dlog("---acknowledging ", d.getReference());
- if (monitor.messageCompleted(d.getReference()))
+ synchronized (lock)
{
- log.error("-----more og msg, trigger...");
- deliverInternal();
+ if (monitor.messageCompleted(d.getReference()))
+ {
+ deliverInternal();
+ }
}
- else
- {
- log.error("---no more og msg, no trigger!");
- }
}
}
@@ -1057,7 +1051,6 @@
//tx rolled back, we need to inform the monitor
for(Iterator i = refsToAdd.iterator(); i.hasNext(); )
{
- log.error("* * * in roll back, telling the monitor about the change.");
MessageReference ref = (MessageReference)i.next();
monitor.unmarkSending(ref);
}
Modified: branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroup.java
===================================================================
--- branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroup.java 2008-10-30 06:55:52 UTC (rev 5215)
+++ branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroup.java 2008-10-30 07:11:17 UTC (rev 5216)
@@ -141,19 +141,16 @@
{
boolean result = false;
ReferenceHolder holder = sortedList.getFirst();
- log.error("---haspending, holder: " + holder);
if (holder != null)
{
if (holder.isPending())
{
//true if the sortedList has more to offer.
- log.error("---see our size: " + sortedList.size());
result = sortedList.size() > 1;
}
else
{
//means we still have the first un-sent.
- log.error("--- first is not sent yet.");
result = true;
}
}
Modified: branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroupMonitor.java
===================================================================
--- branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroupMonitor.java 2008-10-30 06:55:52 UTC (rev 5215)
+++ branches/Branch_JBMESSAGING_1416/src/main/org/jboss/messaging/core/impl/OrderingGroupMonitor.java 2008-10-30 07:11:17 UTC (rev 5216)
@@ -153,7 +153,6 @@
while (iter.hasNext())
{
OrderingGroup group = iter.next();
- log.error("--checking group: " + group.getGroupName());
if (group.hasPendingMessage())
{
result = true;
@@ -264,7 +263,15 @@
return result;
}
+ /**
+ * check if the message has a group name
+ */
+ public static boolean isOrderingGroupMessage(MessageReference ref)
+ {
+ return extractGroupName(ref) != null;
+ }
+
// Inner classes -------------------------------------------------
}
Modified: branches/Branch_JBMESSAGING_1416/tests/src/org/jboss/test/messaging/jms/OrderingGroupConnectionConsumerTest.java
===================================================================
--- branches/Branch_JBMESSAGING_1416/tests/src/org/jboss/test/messaging/jms/OrderingGroupConnectionConsumerTest.java 2008-10-30 06:55:52 UTC (rev 5215)
+++ branches/Branch_JBMESSAGING_1416/tests/src/org/jboss/test/messaging/jms/OrderingGroupConnectionConsumerTest.java 2008-10-30 07:11:17 UTC (rev 5216)
@@ -103,7 +103,7 @@
ServerSessionPool pool = new OrderingServerSessionPool(sessCons1);
- JBossConnectionConsumer cc = (JBossConnectionConsumer)consumerConn.createConnectionConsumer(queue1, null, pool, 1);
+ JBossConnectionConsumer cc = (JBossConnectionConsumer)consumerConn.createConnectionConsumer(queue1, null, pool, 5);
producerConn = cf.createConnection();
@@ -253,7 +253,6 @@
{
try
{
- System.err.println("===== ======= ======== ========== message received: " + ((TextMessage)message).getText());
owner.addReceived((TextMessage)message);
}
catch (Exception e)
More information about the jboss-cvs-commits
mailing list