git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@906560 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-02-04 16:46:51 +00:00
parent ab6bd79b26
commit 50dc880345
4 changed files with 6 additions and 11 deletions

View File

@ -500,6 +500,8 @@
<!-- used just to test potential memory leaks manually --> <!-- used just to test potential memory leaks manually -->
<exclude>**/JDBCTestMemory.*</exclude> <exclude>**/JDBCTestMemory.*</exclude>
<!-- exclude until AMQ-2594 is fixed-->
<exclude>JDBCNegativeQueueTest</exclude>
<exclude>**/amq1490/*</exclude> <exclude>**/amq1490/*</exclude>
<exclude>**/AMQ1925*</exclude> <exclude>**/AMQ1925*</exclude>

View File

@ -86,9 +86,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
clearIterator(true); clearIterator(true);
recovered = true; recovered = true;
} else { } else {
if (LOG.isDebugEnabled()) { LOG.error(regionDestination.getActiveMQDestination().getPhysicalName() + " cursor got duplicate: " + message);
LOG.debug(regionDestination.getActiveMQDestination().getPhysicalName() + " cursor got duplicate: " + message);
}
storeHasMessages = true; storeHasMessages = true;
} }
return recovered; return recovered;
@ -162,10 +160,6 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
recoverMessage(node.getMessage(),true); recoverMessage(node.getMessage(),true);
lastCachedId = node.getMessageId(); lastCachedId = node.getMessageId();
} else { } else {
if (lastCachedId != null && node.getMessageId().getBrokerSequenceId() < lastCachedId.getBrokerSequenceId()) {
lastCachedId = node.getMessageId();
setBatch(lastCachedId);
}
if (cacheEnabled) { if (cacheEnabled) {
cacheEnabled=false; cacheEnabled=false;
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {

View File

@ -231,9 +231,8 @@ public class JDBCMessageStore extends AbstractMessageStore {
if (listener.hasSpace()) { if (listener.hasSpace()) {
Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data)); Message msg = (Message)wireFormat.unmarshal(new ByteSequence(data));
msg.getMessageId().setBrokerSequenceId(sequenceId); msg.getMessageId().setBrokerSequenceId(sequenceId);
if (listener.recoverMessage(msg)) { listener.recoverMessage(msg);
lastMessageId.set(sequenceId); lastMessageId.set(sequenceId);
}
return true; return true;
} }
return false; return false;

View File

@ -345,7 +345,7 @@ public class Statements {
public String getFindNextMessagesStatement() { public String getFindNextMessagesStatement() {
if (findNextMessagesStatement == null) { if (findNextMessagesStatement == null) {
findNextMessagesStatement = "SELECT ID, MSG FROM " + getFullMessageTableName() findNextMessagesStatement = "SELECT ID, MSG FROM " + getFullMessageTableName()
+ " WHERE CONTAINER=? AND ID >= ? ORDER BY ID"; + " WHERE CONTAINER=? AND ID > ? ORDER BY ID";
} }
return findNextMessagesStatement; return findNextMessagesStatement;
} }