}
}
public void recoverSubscription(String subscriptionId, MessageIdentity lastDispatchedMessage, RecoveryListener listener) throws JMSException {
try {
MessageIdentity lastAcked = getLastAcknowledgedMessageIdentity(subscriptionId);
if (lastAcked == null) {
// for a new durable subscription lets write the last ack messageID
// as the previous one that the container delivered to ensure that
// if we go down before acking anything, we will recover to the right point
setLastAcknowledgedMessageIdentity(subscriptionId, lastDispatchedMessage);
return;
}
Object lastAckedSequenceNumber = lastAcked.getSequenceNumber();
// lets iterate through all IDs from the
//Tuple tuple = new Tuple();
Tuple tuple = getOrderedIndex().findGreaterOrEqual(lastAckedSequenceNumber);