private void checkDestinationHandlerExists ( boolean condition , String destName , String engineName ) throws SINotPossibleInCurrentConfigurationException , SITemporaryDestinationNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkDestinationHandlerExists" , new Object [ ] { new Boolean ( condition ) , destName , engineName } ) ; if ( ! condition ) { if ( destName . startsWith ( SIMPConstants . TEMPORARY_QUEUE_DESTINATION_PREFIX ) || destName . startsWith ( SIMPConstants . TEMPORARY_PUBSUB_DESTINATION_PREFIX ) ) { SIMPTemporaryDestinationNotFoundException e = new SIMPTemporaryDestinationNotFoundException ( nls . getFormattedMessage ( "TEMPORARY_DESTINATION_NAME_ERROR_CWSIP0097" , new Object [ ] { destName } , null ) ) ; SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkDestinationHandlerExists" , e ) ; throw e ; } SIMPNotPossibleInCurrentConfigurationException e = new SIMPNotPossibleInCurrentConfigurationException ( nls_cwsik . getFormattedMessage ( "DELIVERY_ERROR_SIRC_15" , // DESTINATION_NOT_FOUND_ERROR_CWSIP0042 new Object [ ] { destName , engineName } , null ) ) ; e . setExceptionReason ( SIRCConstants . SIRC0015_DESTINATION_NOT_FOUND_ERROR ) ; e . setExceptionInserts ( new String [ ] { destName , engineName } ) ; SibTr . exception ( tc , e ) ; // Log a warning message to assist in PD. We use the suppressor to avoid // multiple messages for the same destination. SibTr . warning ( tc_cwsik , SibTr . Suppressor . ALL_FOR_A_WHILE_SIMILAR_INSERTS , "DELIVERY_ERROR_SIRC_15" , new Object [ ] { destName , engineName } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkDestinationHandlerExists" , e ) ; throw e ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkDestinationHandlerExists" ) ; }
Asserts that a DestinationHandler exists . Throws out the appropriate exception if the condition has failed .