void processMsgs ( LockedMessageEnumeration msgEnumeration , ConsumerSession consumerSession ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processMsgs" , new Object [ ] { msgEnumeration , consumerSession } ) ; // Remember that a callback is running asynchConsumerRunning = true ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Entering asynchConsumerCallback.consumeMessages" , new Object [ ] { asynchConsumerCallback , msgEnumeration } ) ; //Call the consumeMessages method on the registered //AsynchConsumerCallback object asynchConsumerCallback . consumeMessages ( msgEnumeration ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Exiting asynchConsumerCallback.consumeMessages" ) ; } catch ( Throwable e ) { //Catch any exceptions thrown by consumeMessages. FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.AsynchConsumer.processMsgs" , "1:124:1.37" , this ) ; //Notify the consumer that this exception occurred. if ( consumerSession != null ) { try { //Notify the consumer that this exception occurred. notifyExceptionListeners ( e , consumerSession ) ; } catch ( Exception connectionClosed ) { //No FFDC code needed } } //Trace the exception but otherwise swallow it since it was not //a failure in MP code or code upon which the MP is critically //dependent. if ( e instanceof Exception ) SibTr . exception ( tc , ( Exception ) e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Exception occurred in consumeMessages " + e ) ; // We're not allowed to swallow this exception - let it work its way back to // the threadpool if ( e instanceof ThreadDeath ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processMsgs" , e ) ; throw ( ThreadDeath ) e ; } } finally { asynchConsumerRunning = false ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processMsgs" ) ; }
Calls the registered AsynchConsumerCallback with the given message enumeration .