qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1169730 - in /qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/transport/ systests/src/main/java/org/apache/qpid/management/jmx/
Date Mon, 12 Sep 2011 13:06:53 GMT
Author: robbie
Date: Mon Sep 12 13:06:53 2011
New Revision: 1169730

URL: http://svn.apache.org/viewvc?rev=1169730&view=rev
Log:
QPID-3459: Increments delivery counter before transfering message to client in order to count
delivery attempts.

Applied patch from Oleksandr Rudyy <orudyy@gmail.com>

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java?rev=1169730&r1=1169729&r2=1169730&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java Mon Sep
12 13:06:53 2011
@@ -1055,9 +1055,9 @@ public class AMQChannel implements Sessi
             public void deliverToClient(final Subscription sub, final QueueEntry entry, final
long deliveryTag)
                     throws AMQException
             {
+                _session.registerMessageDelivered(entry.getMessage().getSize());
                 getProtocolSession().getProtocolOutputConverter().writeDeliver(entry, getChannelId(),
                                                                                deliveryTag,
sub.getConsumerTag());
-               _session.registerMessageDelivered(entry.getMessage().getSize());
             }
 
         };

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java?rev=1169730&r1=1169729&r2=1169730&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
Mon Sep 12 13:06:53 2011
@@ -200,8 +200,8 @@ public class ServerSession extends Sessi
     public void sendMessage(MessageTransfer xfr,
                             Runnable postIdSettingAction)
     {
-        invoke(xfr, postIdSettingAction);
         getConnectionModel().registerMessageDelivered(xfr.getBodySize());
+        invoke(xfr, postIdSettingAction);
     }
 
     public void onMessageDispositionChange(MessageTransfer xfr, MessageDispositionChangeListener
acceptListener)

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java?rev=1169730&r1=1169729&r2=1169730&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
Mon Sep 12 13:06:53 2011
@@ -103,7 +103,7 @@ public class MessageStatisticsDeliveryTe
         MessageConsumer consumer = session.createConsumer(_queue);
         for (int i = 0; i < number; i++)
         {
-            Message msg = consumer.receive(100);
+            Message msg = consumer.receive(1000);
             assertNotNull("Message " + i + " was not received", msg);
         }
     }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message