public void deleteConsumerDispatcher ( boolean callProxyCode ) throws SIRollbackException , SIConnectionLostException , SIResourceException , SIErrorException , SINotPossibleInCurrentConfigurationException //throws SIResourceException, SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteConsumerDispatcher" , new Object [ ] { Boolean . valueOf ( callProxyCode ) , Boolean . valueOf ( isInMatchSpace ) } ) ; //Lock the list of consumers to stop anyone connecting to this consumerDispatcher synchronized ( consumerPoints ) { //Check for attached consumers. If so, throw exception and exit if ( hasConsumersAttached ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteConsumerDispatcher" , "Consumers attached " ) ; throw new SINotPossibleInCurrentConfigurationException ( nls . getFormattedMessage ( "DESTINATION_DELETION_ERROR_CWSIP0112" , new Object [ ] { _baseDestHandler . getName ( ) } , null ) ) ; } } state = SIMPState . DELETED ; //Call the derference routine on the destination. This will remove from the matchspace also // Only required if it really was added to the MatchSpace. if ( isInMatchSpace ) _baseDestHandler . dereferenceSubscriptionConsumerDispatcher ( this , ! isDurable ( ) , callProxyCode ) ; try { if ( isDurable ( ) ) { if ( this instanceof RemoteConsumerDispatcher ) // We're an RME for remote durable. Tell the destination to clean // up any protocol state for us. _baseDestHandler . deleteRemoteDurableRME ( dispatcherState ) ; else // We may have allowed remote access, in which case we need to clean // up any existing AOHs _baseDestHandler . deleteRemoteDurableDME ( dispatcherState . getSubscriberID ( ) ) ; } } catch ( SIDurableSubscriptionNotFoundException e ) { // This would should be FFDC'd FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.deleteConsumerDispatcher" , "1:2265:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; // No point throwing the exception on, the FFDC is the best we can do } getControlAdapter ( ) . dereferenceControllable ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteConsumerDispatcher" ) ; }
Attempts to dereference this consumerDispatcher . Will throw exception if consumers are attached . If succesful the consumerDispatcher reference will be removed from the destination and the consumerDispatcher will be removed from the matchspace .