https://issues.apache.org/jira/browse/AMQ-3998 https://issues.apache.org/jira/browse/AMQ-3999 - fix regression in org.apache.activemq.bugs.AMQ3934Test - resetting batch too eagerly in old behaviour results in picking up deleted message

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1378542 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-08-29 13:30:04 +00:00
parent 935265529f
commit 99be769f96
2 changed files with 3 additions and 4 deletions

View File

@ -34,7 +34,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
protected final Destination regionDestination;
protected final PendingList batchList;
private Iterator<MessageReference> iterator = null;
protected boolean batchResetNeeded = true;
protected boolean batchResetNeeded = false;
private boolean storeHasMessages = false;
protected int size;
private MessageId lastCachedId;
@ -53,8 +53,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
public final synchronized void start() throws Exception{
if (!isStarted()) {
clear();
super.start();
super.start();
resetBatch();
resetSize();
setCacheEnabled(!this.storeHasMessages&&useCache);

View File

@ -77,7 +77,7 @@ public class JdbcDurableSubDupTest {
broker.setAdvisorySupport(false);
broker.setPersistenceAdapter(new JDBCPersistenceAdapter());
PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setMaxAuditDepth(2000);
policyEntry.setMaxAuditDepth(3000);
policyEntry.setMaxPageSize(150);
policyEntry.setPrioritizedMessages(true);
PolicyMap policyMap = new PolicyMap();