void recoverMessages() throws RollbackFailedException {
  if (m_isQueue) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"GSSessionImpl.recoverMessages(): Recovering messages of Queue");
    }
    unackedMessages.clear();
    if (!isAutoAck()) {
      rollbackLocalTransaction();
    }
  }
 else {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"GSSessionImpl.recoverMessages(): Recovering messages of Topic");
    }
    unackedMessages.addAll(recoverMessages);
    LinkedList<MessageQueueElement> temp=unackedMessages;
    recoverMessages.clear();
    unackedMessages=recoverMessages;
    recoverMessages=temp;
  }
}

void recoverMessages ( ) throws RollbackFailedException { if ( m_isQueue ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , "GSSessionImpl.recoverMessages(): Recovering messages of Queue" ) ; } unackedMessages . clear ( ) ; if ( ! isAutoAck ( ) ) { rollbackLocalTransaction ( ) ; } } else { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , "GSSessionImpl.recoverMessages(): Recovering messages of Topic" ) ; } unackedMessages . addAll ( recoverMessages ) ; LinkedList < MessageQueueElement > temp = unackedMessages ; recoverMessages . clear ( ) ; unackedMessages = recoverMessages ; recoverMessages = temp ; } }
performs session recovery . with topics , we redeliver the unacked messages that arrived to the session ( local redelivery ) . with queues , we return the messages to the space so they can be redelivered from there .
