qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r530043 - /incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
Date Wed, 18 Apr 2007 14:46:37 GMT
Author: ritchiem
Date: Wed Apr 18 07:46:36 2007
New Revision: 530043

URL: http://svn.apache.org/viewvc?view=rev&rev=530043
Log:
QPID-458 Fix to make the CSDM check if a message is taken when deliverying to browser. Removing
the message from the queue and continuing if that is the caee.

Modified:
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java?view=diff&rev=530043&r1=530042&r2=530043
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
Wed Apr 18 07:46:36 2007
@@ -445,8 +445,12 @@
     {
         AMQMessage message = messages.peek();
 
-        //while (we have a message) && (The subscriber is not a browser or we are
clearing) && (Check message is taken.)
-        while (message != null && (sub != null && !sub.isBrowser() || sub
== null) && message.taken(_queue, sub))
+        //while (we have a message) && ((The subscriber is not a browser or message
is taken ) or we are clearing) && (Check message is taken.)
+        while (message != null
+               && (
+                ((sub != null && !sub.isBrowser()) || message.isTaken(_queue))
+                || sub == null)
+               && message.taken(_queue, sub))
         {
             //remove the already taken message
             AMQMessage removed = messages.poll();
@@ -507,7 +511,7 @@
                 }
                 if (_log.isDebugEnabled())
                 {
-                    _log.debug(debugIdentity() + "Async Delivery Message " + message.getMessageId()
+ "(" + System.identityHashCode(message) +
+                    _log.debug(debugIdentity() + "Async Delivery Message :" + message + "("
+ System.identityHashCode(message) +
                                ") by :" + System.identityHashCode(this) +
                                ") to :" + System.identityHashCode(sub));
                 }
@@ -527,7 +531,7 @@
 
             if (_log.isDebugEnabled())
             {
-                _log.debug(debugIdentity() + "Async Delivered Message r:" + removed.debugIdentity()
+ "d:" + message.debugIdentity() +
+                _log.debug(debugIdentity() + "Async Delivered Message r:" + removed.debugIdentity()
+ "d:" + message +
                            ") by :" + System.identityHashCode(this) +
                            ") to :" + System.identityHashCode(sub));
             }



Mime
View raw message