public synchronized void commit ( ) throws SIIncorrectCallException , SIRollbackException , SIResourceException , SIConnectionLostException , SIErrorException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "commit" ) ; if ( ! valid ) { throw new SIIncorrectCallException ( nls . getFormattedMessage ( "TRANSACTION_COMPLETE_SICO1022" , null , null ) ) ; } // Mark this as invalid valid = false ; CommsByteBuffer request = getCommsByteBuffer ( ) ; request . putShort ( getConnectionObjectID ( ) ) ; request . putInt ( getTransactionId ( ) ) ; CommsByteBuffer reply = null ; try { // Pass on call to server reply = jfapExchange ( request , JFapChannelConstants . SEG_COMMIT_TRANSACTION , lowestPriority , true ) ; short err = reply . getCommandCompletionCode ( JFapChannelConstants . SEG_COMMIT_TRANSACTION_R ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SIIncorrectCallException ( reply , err ) ; checkFor_SIRollbackException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } catch ( SIConnectionDroppedException e ) { // No FFDC Code needed // In this case we translate this to an SIConnectionLostException - as transactions aren't // tided to a particular connection throw new SIConnectionLostException ( e . getMessage ( ) , e ) ; } finally { if ( reply != null ) reply . release ( ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "commit" ) ; }
Commits this transaction by flowing the commit to the server and marking this transaction as invalid .