protected void handleINEvent ( Exchange exchange , String reqFid ) throws Fault { Message inMsg = exchange . getInMessage ( ) ; EventProducerInterceptor epi = null ; FlowIdHelper . setFlowId ( inMsg , reqFid ) ; ListIterator < Interceptor < ? extends Message > > interceptors = inMsg . getInterceptorChain ( ) . getIterator ( ) ; while ( interceptors . hasNext ( ) && epi == null ) { Interceptor < ? extends Message > interceptor = interceptors . next ( ) ; if ( interceptor instanceof EventProducerInterceptor ) { epi = ( EventProducerInterceptor ) interceptor ; epi . handleMessage ( inMsg ) ; } } }
Calling EventProducerInterceptor in case of logging faults .