}
if (trace) { log.trace("recovering the session"); }
//Call redeliver
SessionDelegate del = (SessionDelegate)mi.getTargetObject();
int ackMode = state.getAcknowledgeMode();
if (ackMode == Session.CLIENT_ACKNOWLEDGE)
{
List dels = state.getClientAckList();
state.setClientAckList(new ArrayList());
del.redeliver(dels);
state.setRecoverCalled(true);
}
else if (ackMode == Session.AUTO_ACKNOWLEDGE || ackMode == Session.DUPS_OK_ACKNOWLEDGE || isXAAndConsideredNonTransacted(state))
{
DeliveryInfo info = state.getAutoAckInfo();
//Don't recover if it's already to cancel
if (info != null)
{
List redels = new ArrayList();
redels.add(info);
del.redeliver(redels);
state.setAutoAckInfo(null);
state.setRecoverCalled(true);
}