public void recoverSubscription(String subscriptionId, MessageIdentity lastDispatchedMessage, final RecoveryListener listener) throws JMSException {
Connection c = null;
try {
c = persistenceAdapter.getConnection();
adapter.doRecoverSubscription(c, destinationName, subscriptionId, new MessageListResultHandler() {
public void onMessage(long seq, String messageID) throws JMSException {
MessageIdentity messageIdentity = new MessageIdentity(messageID, new Long(seq));
listener.recoverMessage(messageIdentity);
}
});