public ConsumableKey attachToDurableSubscription(
                                                     LocalConsumerPoint consumerPoint,
                                                     ConsumerDispatcherState subState)
                    throws
                    SIDurableSubscriptionMismatchException,
                    SIDurableSubscriptionNotFoundException,
                    SIDestinationLockedException,
                    SISelectorSyntaxException,
                    SIDiscriminatorSyntaxException,
                    SINotPossibleInCurrentConfigurationException,
                    SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "attachToDurableSubscription",
                        new Object[] { consumerPoint, subState });

        // Extract the UUID for the durable home and see whether this is a local
        // or remote attach
        ConsumableKey result = null;
        SIBUuid8 durableHomeID =
                        _messageProcessor.mapMeNameToUuid(subState.getDurableHome());
        if (durableHomeID == null)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "attachToDurableSubscription", "SIResourceException");
            // Lookup failed, throw an excepiton
            throw new SIResourceException(
                            nls.getFormattedMessage(
                                                    "REMOTE_ME_MAPPING_ERROR_CWSIP0156",
                                                    new Object[] { subState.getDurableHome() },
                                                    null));
        }

        // Is durableHome local?
        if (durableHomeID.equals(_messageProcessor.getMessagingEngineUuid()))
        {
            // Directly attached
            result = attachToLocalDurableSubscription(consumerPoint, subState);
        } else
        {
            // Stash the durableHomeID in the ConsumerDispatcherState
            subState.setRemoteMEUuid(durableHomeID);
            // Remote attach
            result =
                            attachToRemoteDurableSubscription(
                                                              consumerPoint,
                                                              subState,
                                                              durableHomeID);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "attachToDurableSubscription", result);

        return result;
    }
public ConsumableKey attachToDurableSubscription ( LocalConsumerPoint consumerPoint , ConsumerDispatcherState subState ) throws SIDurableSubscriptionMismatchException , SIDurableSubscriptionNotFoundException , SIDestinationLockedException , SISelectorSyntaxException , SIDiscriminatorSyntaxException , SINotPossibleInCurrentConfigurationException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "attachToDurableSubscription" , new Object [ ] { consumerPoint , subState } ) ; ConsumableKey result = null ; SIBUuid8 durableHomeID = _messageProcessor . mapMeNameToUuid ( subState . getDurableHome ( ) ) ; if ( durableHomeID == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attachToDurableSubscription" , "SIResourceException" ) ; throw new SIResourceException ( nls . getFormattedMessage ( "REMOTE_ME_MAPPING_ERROR_CWSIP0156" , new Object [ ] { subState . getDurableHome ( ) } , null ) ) ; } if ( durableHomeID . equals ( _messageProcessor . getMessagingEngineUuid ( ) ) ) { result = attachToLocalDurableSubscription ( consumerPoint , subState ) ; } else { subState . setRemoteMEUuid ( durableHomeID ) ; result = attachToRemoteDurableSubscription ( consumerPoint , subState , durableHomeID ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "attachToDurableSubscription" , result ) ; return result ; }
Attaches to a created DurableSubscription

Checks that there are no active subscriptions (unless it supports cloning)

Checks that the durable subscription exists :

@param consumerPoint