DatabaseEntry keyEntry = new DatabaseEntry();
DatabaseEntry valueEntry = new DatabaseEntry();
OperationStatus status = cursor.getFirst(sequenceNumberEntry, keyEntry, valueEntry, LockMode.DEFAULT);
while (status == OperationStatus.SUCCESS) {
String messageID = extractString(keyEntry);
container.recoverMessageToBeDelivered(new MessageIdentity(messageID, sequenceNumberEntry));
status = cursor.getNext(sequenceNumberEntry, keyEntry, valueEntry, LockMode.DEFAULT);
}
if (status != OperationStatus.NOTFOUND) {
log.warn("Unexpected status code while recovering: " + status);
}