You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2010/04/06 16:00:22 UTC

svn commit: r931157 - /qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java

Author: robbie
Date: Tue Apr  6 14:00:21 2010
New Revision: 931157

URL: http://svn.apache.org/viewvc?rev=931157&view=rev
Log:
QPID-2455: Pull the message size from the AMQMessage instead of digging it out from the contentHeaderBody which may be on disk

Applied patch from Sorin Suciu <ss...@gmail.com>

Modified:
    qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java

Modified: qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java?rev=931157&r1=931156&r2=931157&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/NotificationCheck.java Tue Apr  6 14:00:21 2010
@@ -47,16 +47,7 @@ public enum NotificationCheck
             if(maximumMessageSize != 0)
             {
                 // Check for threshold message size
-                long messageSize;
-                try
-                {
-                    messageSize = (msg == null) ? 0 : msg.getContentHeaderBody().bodySize;
-                }
-                catch (AMQException e)
-                {
-                    messageSize = 0;
-                }
-
+                long messageSize = (msg == null) ? 0 : msg.getSize();
 
                 if (messageSize >= maximumMessageSize)
                 {



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