private RollbackMessageResponse processRollbackMessage( RollbackMessageQuery query ) throws JMSException
{
LocalConnection localConnection = getLocalConnection();
LocalSession localSession = (LocalSession)localConnection.lookupRegisteredSession(query.getSessionId());
if (localSession != null)
{
// Rollback undelivered prefetched messages
List undeliveredMessageIDs = new ArrayList();
undeliveredMessageIDs.add(query.getMessageId());
localSession.rollbackUndelivered(undeliveredMessageIDs);
LocalMessageConsumer consumer = (LocalMessageConsumer)localSession.lookupRegisteredConsumer(query.getConsumerId());
if (consumer != null)
consumer.restorePrefetchCapacity(1);
}
return new RollbackMessageResponse();