/** * Unsubscribe from the destination. */ private void unsubscribe() { SubscriptionIdentifier subscriptionId = getIdentifier(); NamedCache destinationCache = CacheFactory.getCache(Destination.CACHENAME); destinationCache.invoke(subscriptionId.getDestinationIdentifier(), new UnsubscribeProcessor(subscriptionId)); }
/** * {@inheritDoc} */ public void unsubscribe() { if (isActive()) { // shutdown local resources for the subscription shutdown(State.Shutdown); // Unsubscribe from the destination. Wait until the subscription is deleted to avoid the bug in INC-795 CacheFactory.getCache(Destination.CACHENAME).invoke(getDestinationIdentifier(), new UnsubscribeProcessor(getSubscriptionIdentifier())); } }