static void rcvRollbackTransaction ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvRollbackTransaction" , new Object [ ] { request , conversation , "" + requestNumber , "" + allocatedFromBufferPool } ) ; short connectionObjectId = request . getShort ( ) ; // BIT16 ConnectionObjectId int clientTransactionId = request . getInt ( ) ; // BIT32 Client transaction Id if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "SICoreConnection Id:" , connectionObjectId ) ; SibTr . debug ( tc , "Client transaction Id:" , clientTransactionId ) ; } try { // Get the transaction out of the table ServerLinkLevelState linkState = ( ServerLinkLevelState ) conversation . getLinkLevelAttachment ( ) ; SITransaction tran = linkState . getTransactionTable ( ) . get ( clientTransactionId ) ; if ( tran == IdToTransactionTable . INVALID_TRANSACTION ) { Throwable e = linkState . getTransactionTable ( ) . getExceptionForRollbackOnlyLocalTransaction ( clientTransactionId ) ; //Remove transaction from the table linkState . getTransactionTable ( ) . removeLocalTransaction ( clientTransactionId ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Looks like the transaction failed to create" , e ) ; } else { // At this point here the transaction will only be rolled back. // Therefore, any subsequent operations will be invalid and will be thrown out // by the client. As such, remove it from the table. linkState . getTransactionTable ( ) . removeLocalTransaction ( clientTransactionId ) ; SIUncoordinatedTransaction siTran = ( SIUncoordinatedTransaction ) tran ; siTran . rollback ( ) ; } try { conversation . send ( poolManager . allocate ( ) , JFapChannelConstants . SEG_ROLLBACK_TRANSACTION_R , requestNumber , JFapChannelConstants . PRIORITY_MEDIUM , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvRollbackTransaction" , CommsConstants . STATICCATTRANSACTION_ROLLBACK_01 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2026" , e ) ; } } catch ( SIException e ) { //No FFDC code needed //Only FFDC if we haven't received a meTerminated event. if ( ! ( ( ConversationState ) conversation . getAttachment ( ) ) . hasMETerminated ( ) ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvRollbackTransaction" , CommsConstants . STATICCATTRANSACTION_ROLLBACK_02 ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATTRANSACTION_ROLLBACK_02 , conversation , requestNumber ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "rcvRollbackTransaction" ) ; }
Rollback the transaction provided by the client .