You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2009/11/12 11:48:40 UTC
svn commit: r835329 - in /activemq/branches/activemq-5.3/activemq-core/src:
main/java/org/apache/activemq/broker/region/
test/java/org/apache/activemq/broker/ test/java/org/apache/activemq/usecases/
Author: gtully
Date: Thu Nov 12 10:48:39 2009
New Revision: 835329
URL: http://svn.apache.org/viewvc?rev=835329&view=rev
Log:
svn merge -c 835325 https://svn.apache.org/repos/asf/activemq/trunk - resolve https://issues.apache.org/activemq/browse/AMQ-2487, patch applied, test added
Modified:
activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?rev=835329&r1=835328&r2=835329&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java Thu Nov 12 10:48:39 2009
@@ -723,7 +723,11 @@
.getDestination());
if (context.getBroker()==null) {
context.setBroker(getRoot());
- }
+ }
+
+ // Clear out the memory usage for the old queue.
+ // We'll reset it to the DLQ below:
+ message.setMemoryUsage(null);
BrokerSupport.resendNoCopy(context,message,
deadLetterDestination);
}
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java?rev=835329&r1=835328&r2=835329&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java Thu Nov 12 10:48:39 2009
@@ -19,8 +19,8 @@
import javax.jms.DeliveryMode;
import junit.framework.Test;
+
import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ConnectionInfo;
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java?rev=835329&r1=835328&r2=835329&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/ExpiredMessagesTest.java Thu Nov 12 10:48:39 2009
@@ -172,6 +172,10 @@
});
assertEquals("dlq contains all expired", totalExpiredCount, dlqView.getQueueSize());
+ // memory check
+ assertEquals("memory usage is back to duck egg", 0, view.getMemoryPercentUsage());
+ assertTrue("memory usage is increased ", 0 < dlqView.getMemoryPercentUsage());
+
// verify DQL
MessageConsumer dlqConsumer = createDlqConsumer(connection);
int count = 0;