private void deliverAsynchExceptionToClient ( Throwable throwable , String probeId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deliverAsynchExceptionToClient" , throwable ) ; if ( ! isComplete ( ) ) { if ( alarm != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Cancelling the alarm: " + alarm . toString ( ) ) ; alarm . cancel ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Alarm cancelled" ) ; } if ( ! isComplete ( ) ) { //Deregister listener as we are now done with our receive. //Deregistration will probably fail in most cases so ignore any exceptions. try { final MPConsumerSession mpSession = ( MPConsumerSession ) mainConsumer . getConsumerSession ( ) ; mpSession . getConnection ( ) . removeConnectionListener ( this ) ; } catch ( SIException s ) { //No FFDC code needed as everything has likely gone wrong already at this point. if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , s . getMessage ( ) , s ) ; } sendErrorToClient ( throwable , probeId ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "deliverAsynchExceptionToClient" ) ; }
Common routine used by all the connection listener methods that deliver an exception to the client .