/** * {@inheritDoc} */ public void rollback() { ensureActive(); resetMessageSequenceVerification(); if (!isAutoCommitting()) { // ensure that we have a subscription from which we can retrieve // messages ensureSubscription(); // determine the range of messages that are visible // (these are the ones we must rollback) MessageTracker messageTracker = (MessageTracker) CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(), new ExtractorProcessor("getVisibleMessageTracker")); NamedCache destinationCache = CacheFactory.getCache(Destination.CACHENAME); destinationCache.invoke(getDestinationIdentifier(), new RollbackMessageProcessor(getSubscriptionIdentifier(), messageTracker)); // clear the delivered list for the subscription CacheFactory.getCache(Subscription.CACHENAME).invoke(getSubscriptionIdentifier(), new SubscriptionRollbackProcessor()); } }