public int prepareAndCommit(TransactionManager mgr,ServerTransaction st,OperationID operationID) throws UnknownTransactionException, RemoteException {
  if (_operationLogger.isLoggable(Level.FINEST))   _operationLogger.finest("preparing and committing transaction [" + createTransactionDetailsString(st,operationID) + "]");
  int result;
  if (isExecutedAlready(operationID)) {
    handleDuplicateCommitOperation(st,operationID);
    result=TransactionConstants.COMMITTED;
  }
 else {
    result=prepare(mgr,st,true,false,operationID);
    if (result == TransactionConstants.PREPARED) {
      commitSA(mgr,st,false,null,true);
      result=TransactionConstants.COMMITTED;
    }
  }
  if (_operationLogger.isLoggable(Level.FINEST))   _operationLogger.finest("prepared and committed transaction [" + createTransactionDetailsString(st,operationID) + "] result="+ result);
  return result;
}

public int prepareAndCommit ( TransactionManager mgr , ServerTransaction st , OperationID operationID ) throws UnknownTransactionException , RemoteException { if ( _operationLogger . isLoggable ( Level . FINEST ) ) _operationLogger . finest ( "preparing and committing transaction [" + createTransactionDetailsString ( st , operationID ) + "]" ) ; int result ; if ( isExecutedAlready ( operationID ) ) { handleDuplicateCommitOperation ( st , operationID ) ; result = TransactionConstants . COMMITTED ; } else { result = prepare ( mgr , st , true , false , operationID ) ; if ( result == TransactionConstants . PREPARED ) { commitSA ( mgr , st , false , null , true ) ; result = TransactionConstants . COMMITTED ; } } if ( _operationLogger . isLoggable ( Level . FINEST ) ) _operationLogger . finest ( "prepared and committed transaction [" + createTransactionDetailsString ( st , operationID ) + "] result=" + result ) ; return result ; }
prepare and commit the transaction - called for single participant transaction or transaction without changes
