Commit the transactions since the last commit.
Override this for SQL implementations.
@exception DBException An exception.
558984
public void commit() throws DBException, RemoteException
    {
        BaseTransport transport = this.createProxyTransport(COMMIT);
        Object strReturn = transport.sendMessageAndGetReply();
        Object objReturn = transport.convertReturnObject(strReturn);
        this.checkDBException(objReturn);
    }
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);
            }
        }
    }
617843
public void commit() throws ResourceException {
        if (tc.isEntryEnabled())
            Tr.entry(this, tc, "commit", ivMC);

        // if the MC marked Stale, it means the user requested a purge pool with an immediate option
        // so don't allow any work on the mc
        if (ivMC._mcStale) {
            if (tc.isDebugEnabled())
                Tr.debug(this, tc, "MC is stale");
            throw new DataStoreAdapterException("INVALID_CONNECTION", AdapterUtil.staleX(), WSRdbSpiLocalTransactionImpl.class);
        }

        if (dsConfig.get().enableMultithreadedAccessDetection) 
            ivMC.detectMultithreadedAccess(); 

        if (!ivMC.isTransactional()) { // do nothing if no enlistment
            if (tc.isEntryEnabled())
                Tr.exit(this, tc, "commit", "no-op.  Enlistment disabled");
            return;
        }

        if (tc.isDebugEnabled()) {
            String cId = null;
            try {
                cId = ivMC.mcf.getCorrelator(ivMC); 
            } catch (SQLException x) {
                // will just log the exception here and ignore it since its in trace
                Tr.debug(
                         tc,
                         "got an exception trying to get the correlator, exception is: ",
                         x);
            }

            if (cId != null) {
                StringBuffer stbuf = new StringBuffer(200);
                stbuf.append("Correlator: DB2, ID: ");
                stbuf.append(cId);
                stbuf.append(" Transaction : ");
                stbuf.append(this);
                stbuf.append(" COMMIT");

                Tr.debug(this, tc, stbuf.toString());
            }
        }

        ResourceException re = ivStateManager.isValid(WSStateManager.LT_COMMIT);

        if (re == null)
            try 
            {
                // If no work was done during the transaction, the autoCommit value may still
                // be on.  In this case, just no-op, since some drivers like ConnectJDBC 3.1
                // don't allow commit/rollback when autoCommit is on.  

                //  here the autocommit is always false, so we can call commit.
                ivConnection.commit();

                //Note this exception is not caught - This is because
                //  1)  it is of type ResourceException so it can be thrown from the method
                //  2)  if isValid is okay, this should never fail.  If isValid is not okay
                //     an exception is thrown from there
                // Already validated the state in this sync block, so just set it. 
                ivStateManager.transtate = WSStateManager.NO_TRANSACTION_ACTIVE;
            } 
            catch (SQLException se) {
                FFDCFilter.processException(
                                            se,
                                            "com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl.commit",
                                            "139",
                                            this);
                ResourceException x = AdapterUtil.translateSQLException(se, ivMC, true, currClass);
                if (tc.isEntryEnabled())
                    Tr.exit(this, tc, "commit", "Exception");
                throw x;
            }
        else 
        {
            // state change was not valid         

            LocalTransactionException local_tran_excep =
                            new LocalTransactionException(re.getMessage());
            DataStoreAdapterException ds = new DataStoreAdapterException(
                                            "WS_INTERNAL_ERROR",
                                            local_tran_excep,
                                            currClass,
                                            "Cannot commit SPI local transaction.",
                                            "",
                                            local_tran_excep.getMessage());
            if (tc.isEntryEnabled())
                Tr.exit(this, tc, "commit", "Exception");
            throw ds;
        }

        // Reset so we can deferred enlist in a future global transaction. 
        ivMC.wasLazilyEnlistedInGlobalTran = false; 

        if (tc.isEventEnabled())
            Tr.event(
                     tc,
                     "SPILocalTransaction committed. ManagedConnection state is "
                                     + ivMC.getTransactionStateAsString());

        if (tc.isEntryEnabled())
            Tr.exit(this, tc, "commit");
    }
512117
public function commit($xid)
    {
        if ($this->activeTransaction != $xid || $this->activeTransaction === false) {
            return;
        }

        $this->activeTransaction = false;

        if (!$this->connection->commit()) {
            throw new DbException("Commit failed");
        }

        $this->connection->autocommit(true);
    }
45445
public void commit(DBTransaction transaction) {
        try {
            applyUpdates(transaction);
        } catch (Exception e) {
            m_logger.error("Updates failed", e);
            throw e;
        } finally {
            transaction.clear();
        }
    }
1059966
@Override
   public void close() throws SQLException {

      switch(transactionState) {
         case CLOSED: //Segment close will ignore multiple close on same connection, but need to skip the other stuff.
            return;
         case NONE: //Autocommit never changed
            transactionState = TransactionState.CLOSED;
            break;
         default:
            try {
               resolveIncompleteTransactions();
               transactionState = TransactionState.CLOSED;
            } catch(Throwable t) {
               setLogicalCloseException(t);
            } finally {
               try {
                  if(!conn.getAutoCommit()) { //Set auto-commit
                     conn.setAutoCommit(true);
                  }
               } catch(Throwable t) {
                  setLogicalCloseException(t);
               }
            }
      }

      boolean openStatements = closeStatements();

      Throwable logicalCloseException = this.logicalCloseException; //Preserve the exception - segment will set to null. 

      segment.close(this);

      if(logicalCloseException != null) { //Now throw to the caller
         Util.throwException(logicalCloseException);
      }

      if(openStatements && openStatementPolicy == OpenStatementPolicy.REPORT) {
         throw new SQLException("Connection has open statements", JDBConnection.SQLSTATE_CONNECTION_EXCEPTION);
      }
   }
1073966
public static function database_transaction_commited() {
        if (self::$dispatching or empty(self::$extbuffer)) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }
179035
def commit(self):
        
        if hasattr(self.local, 'tx') and self.local.tx:
            tx = self.local.tx.pop()
            tx.commit()
            self._flush_tables()
425202
public void commit() throws HandlerException {
        if (_isInitiator) {
            try {
                _userTx.commit();
            } catch (SystemException se) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionCommitFailedSystem(se);
            } catch (HeuristicRollbackException hre) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionCommitFailedRollback(hre);
            } catch (HeuristicMixedException hme) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionCommitFailedMixed(hme);
            } catch (RollbackException re) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionCommitFailed(re);
            }
        }
    }
1207949
def commit(self):
        

        try:
            self.check_connection()
        except NullDatabaseConnectionError:
            return

        logger.debug("commit: path='{}'".format(self.database_path))

        try:
            self.connection.commit()
        except sqlite3.ProgrammingError:
            pass
577748
public function commit()
    {
        if ($this->rollbackAgain) {
            throw new \wf\db\Exception('Please throw exception after rollback in last catch block');
        }

        --$this->transactions;
    
        if($this->transactions == 0 && false === $this->dbh->commit()) {
            throw new \wf\db\Exception('transaction commit error: ' . $this->getLastErr());
        }

        if ($this->transactions < 0) {
            $this->transactions = 0;
        }
    }
1235104
public void commit() throws SQLException {
    lock.lock();
    try {
      if (protocol.inTransaction()) {
        try (Statement st = createStatement()) {
          st.execute("COMMIT");
        }
      }
    } finally {
      lock.unlock();
    }
  }
32001
@Override
    public void commit() throws SQLException
    {
        checkClosed();
        if (props.getProperty(COMMIT_THROW_EXCEPTION, "true").equalsIgnoreCase("true")) {
            throw SQLError.noSupport();
        }
    }
443752
def commit(self):
        """"""
        try:
            self._con.commit()
            self._con.autocommit(True)
        except Exception as e:
            try:
                self._con.rollback()
            except Exception as e_:
                LOGGER.error('When transaction happend error: %s', e_)
            raise e
        finally:
            self._db.pool.push(self._con)
            self._con = None
            self._db = None
526644
final public function commit()
    {
        if (!$this->pdo) {
            throw  new Exception('您还没有连接数据库', Exception::CODE_DATABASE_ERROR);
        }
        $this->_begintransaction = false;
        return $this->pdo->commit();
    }
1226255
public void beginTransaction() throws SQLException {
		final Connection conn = getConnection();
		checkTransactionSupported(conn);
		conn.setAutoCommit(false);
	}
255234
@Override
  public void commit() throws IOException {
    try {
      LOG.info("Flushing pending insert.");
      this.commands.flush();
      LOG.info("Commiting transaction.");
      this.conn.commit();
    } catch (Exception e) {
      this.failed = true;
      throw new RuntimeException(e);
    }
  }