@ Override public void unlockMsg ( long lockID , Transaction transaction , boolean incrementUnlock ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "unlockMsg" , new Object [ ] { Long . valueOf ( lockID ) , transaction , Boolean . valueOf ( incrementUnlock ) } ) ; if ( failedInitInRestore ) { initialiseNonPersistent ( true ) ; } if ( incrementUnlock ) { // If we do not wish to increment the count, there is no point checking // against redelivery threshold redeliveryCountReached = false ; try { if ( PRE_UNLOCKED_1 != null ) { PRE_UNLOCKED_1 . messageEventOccurred ( MessageEvents . PRE_UNLOCKED , this , transaction ) ; } if ( PRE_UNLOCKED_2 != null ) { PRE_UNLOCKED_2 . messageEventOccurred ( MessageEvents . PRE_UNLOCKED , this , transaction ) ; } } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.store.items.MessageItem.unlockMsg" , "1:2955:1.244.1.40" , this ) ; SibTr . exception ( tc , e ) ; // Something went wrong so make sure we unlock the message redeliveryCountReached = false ; } } // If the pre_unlocked callback redirected the message to the exc dest, // then unlock the message. if ( ! redeliveryCountReached ) { unlock ( lockID , transaction , incrementUnlock ) ; SIMPItemStream itemStream = ( SIMPItemStream ) getItemStream ( ) ; BaseDestinationHandler bdh = getDestinationHandler ( false , itemStream ) ; // proceede if and only if the redeliverycount column exists if ( bdh . isRedeliveryCountPersisted ( ) && bdh . getMessageProcessor ( ) . getMessageStore ( ) . isRedeliveryCountColumnAvailable ( ) ) { int rdl_count = guessRedeliveredCount ( ) ; persistRedeliveredCount ( rdl_count ) ; //updating the value in MFP. if ( msg != null ) msg . setRedeliveredCount ( rdl_count ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "unlockMsg" ) ; }
unlockMsg - call any registered callbacks before we unlock the message N . B All MP unlocking should go through this method