Commit the transaction
@throws MysqltcsException on commit error
499261
public function commit()
    {
        if($this->mysqliRef->commit()) {
            $this->log("commit");
            return;
        }
        $mex = "Mysql error: it is not possible perform the commit. ".$this->mysqliRef->error;
        $this->log($mex);
        throw new MysqltcsException($mex);
    }
1060756
public void localCommit()
    {
        if (log.isDebugEnabled()) log.debug("commit was called");
        if (!this.isInLocalTransaction)
        {
            throw new TransactionNotInProgressException("Not in transaction, call begin() before commit()");
        }
        try
        {
            if(!broker.isManaged())
            {
                if (batchCon != null)
                {
                    batchCon.commit();
                }
                else if (con != null)
                {
                    con.commit();
                }
            }
            else
            {
                if(log.isDebugEnabled()) log.debug(
                        "Found managed environment setting in PB, will skip Connection.commit() call");
            }
        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
            this.releaseConnection();
        }
    }
364939
@Override
	public void commit() {
		if (conn != null) {
			try {
				conn.commit();
			} catch (SQLException e) {
				throw new UroborosqlSQLException(e);
			}
		}
	}
319787
@Override
    public void commit() throws InvalidKBException {
        if (isClosed()) {
            return;
        }
        try {
            checkMutationAllowed();
            removeInferredConcepts();
            validateGraph();
            // lock on the keyspace cache shared between concurrent tx's to the same keyspace
            // force serialization & atomic updates, keeping Janus and our KeyspaceCache in sync
            synchronized (keyspaceCache) {
                commitTransactionInternal();
                transactionCache.flushToKeyspaceCache();
            }
        } finally {
            String closeMessage = ErrorMessage.TX_CLOSED_ON_ACTION.getMessage("committed", keyspace());
            closeTransaction(closeMessage);
        }
    }
1073966
public static function database_transaction_commited() {
        if (self::$dispatching or empty(self::$extbuffer)) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }
332001
public function commit()
    {
        try {
            $this->connection->commit();
        } catch (DBALException $e) {
            throw new QueryException($e->getMessage(), $e->getCode(), $e);
        }
    }
1082532
public function commit()
    {
        if (!$this->getIsActive()) {
            throw new Exception('Failed to commit transaction: transaction was inactive.');
        }

        $this->_level--;
        if ($this->_level === 0) {
            Log::debug('Commit transaction' . __METHOD__);
            $this->db->pdo->commit();
            $this->db->trigger(Connection::EVENT_COMMIT_TRANSACTION);
            return;
        }

        $schema = $this->db->getSchema();
        if ($schema->supportsSavepoint()) {
            Log::debug('Release savepoint ' . $this->_level . __METHOD__);
            $schema->releaseSavepoint('LEVEL' . $this->_level);
        } else {
            Log::info('Transaction not committed: nested transaction not supported' . __METHOD__);
        }
    }
658914
public void commitThis(boolean onePhase) throws XAException {

        if (onePhase && state == XA_STATE_PREPARED) {
            throw new XAException(
                "Transaction is in a 2-phase state when 1-phase is requested");
        }

        if ((!onePhase) && state != XA_STATE_PREPARED) {
            throw new XAException("Attempt to do a 2-phase commit when "
                                  + "transaction is not prepared");
        }

        //if (!onePhase) {
        //  throw new XAException(
        //   "Sorry.  HSQLDB has not implemented 2-phase commits yet");
        //}
        try {

            /**
             * @todo:  Determine if work was committed, rolled back, or both,
             * and return appropriate Heuristic*Exception.
             * connection.commit();
             *  Commits the real, physical conn.
             */
            connection.commit();
        } catch (SQLException se) {
            throw new XAException(se.getMessage());
        }

        dispose();
    }
1128489
@Override
    public void commit()
    {
        if (!getRollbackOnly())
        {
            onTransaction(TxAction.COMMIT);
            ((EntityManagerImpl) entityManager).getPersistenceDelegator().commit();
        }
    }
1206135
@Override
	public void onTxCommit(Transaction tx) {
		if (!tx.isReadOnly() && enableLogging) {
			LogSeqNum lsn = new CommitRecord(txNum).writeToLog();
			VanillaDb.logMgr().flush(lsn);
		}
	}
1048029
public function commit()
    {
        if (!$this->transactor instanceof TransactionInterface) {
            throw new OrmException("Connection not set");
        }

        $this->checkForChangedRelations();
        $this->checkForUpdates();
        $this->preCommit();
        $this->transactor->beginTransaction();

        try {
            $this->insert();
            $this->update();
            $this->delete();
            $this->transactor->commit();
        } catch (\Exception $e) {
            $this->transactor->rollBack();
            $this->postRollback();
            throw new OrmException("Commit failed.\n" . $e->getMessage(), 0, $e);
        }

        $this->postCommit();

        // Clear our schedules
        $this->scheduledForInsertion = [];
        $this->scheduledForUpdate    = [];
        $this->scheduledForDeletion  = [];
        $this->entityRegistry->clearAggregateRoots();
    }
1312089
protected function _commit()
    {
        if (!db2_commit($this->_connection)) {
            /**
             * @see Zend_Db_Adapter_Db2_Exception
             */
            // require_once 'Zend/Db/Adapter/Db2/Exception.php';
            throw new Zend_Db_Adapter_Db2_Exception(
                db2_conn_errormsg($this->_connection),
                db2_conn_error($this->_connection));
        }

        $this->_setExecuteMode(DB2_AUTOCOMMIT_ON);
    }
1182912
void commitTransaction() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "commitTransaction");

        try {
            jcaSession.commitLocalTransaction();
            uncommittedReceiveCount = 0;
        } catch (javax.resource.spi.IllegalStateException ise) {
            // No FFDC code needed
            // d238447 FFDC review. Generate FFDC
            throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                               "EXCEPTION_RECEIVED_CWSIA0053",
                                                                               new Object[] { ise, "JmsSessionImpl.commitTransaction (#1)" },
                                                                               ise,
                                                                               "JmsSessionImpl.commitTransaction#1",
                                                                               this,
                                                                               tc
                            );
        } catch (javax.resource.spi.LocalTransactionException lte) {
            // No FFDC code needed
            // d238447 FFDC Review. LocalT thrown if no transaction in progress. Wouldn't expect
            //   us to call commit if this was the case, so generate FFDC.
            throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                               "EXCEPTION_RECEIVED_CWSIA0053",
                                                                               new Object[] { lte, "JmsSessionImpl.commitTransaction (#2)" },
                                                                               lte,
                                                                               "JmsSessionImpl.commitTransaction#2",
                                                                               this,
                                                                               tc
                            );
        } catch (SIConnectionDroppedException e) { //PK60857  connection no longer available so tran will timeout and rollback on the server side
            // No FFDC code needed
            // Generate FFDC.
            rolledBackDueToConnectionFailure = true;
            throw (TransactionRolledBackException) JmsErrorUtils.newThrowable(
                                                                              TransactionRolledBackException.class, // subclass of JMSException
                                                                              "EXCEPTION_RECEIVED_CWSIA0053",
                                                                              new Object[] { e, "JmsSessionImpl.commitTransaction (#4)" },
                                                                              e,
                                                                              "JmsSessionImpl.commitTransaction#4",
                                                                              this,
                                                                              tc
                            );

        } catch (SIConnectionLostException e) { //PK60857  connection failed during the commit, result unknown.  This is a risk of 1PC, assume rollback.
            // No FFDC code needed
            // Generate FFDC.
            rolledBackDueToConnectionFailure = true;
            throw (TransactionRolledBackException) JmsErrorUtils.newThrowable(
                                                                              TransactionRolledBackException.class, // subclass of JMSException
                                                                              "EXCEPTION_RECEIVED_CWSIA0053",
                                                                              new Object[] { e, "JmsSessionImpl.commitTransaction (#5)" },
                                                                              e,
                                                                              "JmsSessionImpl.commitTransaction#5",
                                                                              this,
                                                                              tc
                            );
        }

        catch (Exception e) {
            // No FFDC code needed
            // d238447 FFDC review. Includes ResourceException, SIException, SIErrorException
            // Generate FFDC.
            throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                            "EXCEPTION_RECEIVED_CWSIA0053",
                                                            new Object[] { e, "JmsSessionImpl.commitTransaction (#3)" },
                                                            e,
                                                            "JmsSessionImpl.commitTransaction#3",
                                                            this,
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "commitTransaction");
    }
357824
public function commit()
    {
        try {
            $toUpdate = array_merge($this->getFieldsToUpdate(), $this->getFieldsToDelete());

            if (! empty($toUpdate)) {
                $idField  = $this->_item->getIdField();

                $query = "
                    UPDATE
                        `" . $this->getDbPrefix() . $this->_item->getDbContainer() . "`
                    SET
                        " . $this->_getPreparedFields($toUpdate) . "
                    WHERE
                        `$idField` = ?";

                if (! array_key_exists($idField, $toUpdate)) {
                    $toUpdate[$idField] = $this->_item->getId()->getOrig();
                }

                $prepared = Agl::app()->getDb()->getConnection()->prepare($query);

                if (! $prepared->execute(array_values($toUpdate))) {
                    $error = $prepared->errorInfo();
                    throw new Exception("The update query failed (table '" . $this->getDbPrefix() . $this->_item->getDbContainer() . "') with message '" . $error[2] . "'");
                }

                if (Agl::app()->isDebugMode()) {
                    Agl::app()->getDb()->incrementCounter();
                }

                return $prepared->rowCount();
            }
        } catch (Exception $e) {
            throw new Exception($e);
        }

        return true;
    }
667274
@Override
    public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException,
            SecurityException, IllegalStateException, SystemException
    {
        Transaction tx = threadLocal.get();

        try
        {
            if (tx != null)
            {
                if (log.isDebugEnabled())
                    log.info("Commiting transaction:" + tx);
                tx.commit();
            }
            else
            {
                log.debug("Cannot locate a transaction to commit.");

            }
        }
        finally
        {
            if (log.isDebugEnabled())
                log.info("Resetting after commit.");
            threadLocal.set(null);
            timerThead.set(null);
        }
    }
360228
public void commit() {
        log.debug("Performing commit");
        for (CompensatingTransactionOperationExecutor operationExecutor : operationExecutors) {
            try {
                operationExecutor.commit();
            } catch (Exception e) {
                throw new TransactionSystemException(
                        "Error occurred during commit", e);
            }
        }
    }
789235
@Override
    public void commit() throws DataCorruptedException, IOException, IllegalStateException
    {
        try {
            this.txContext.finish();
        } catch (final TransactionFailureException tfe1) {
            try {
                this.txContext.abort();
            } catch (final TransactionFailureException tfe2) {
            }
            throw new IOException("Error trying to commit transaction.", tfe1);
        }
    }