Called by TransactionScope.
334023
void exited(Transaction txn, Transaction active) {
        TransactionMonitor monitor = mMonitor;
        if (monitor != null) {
            monitor.exited(txn, active);
        }
    }
87390
public final void commitUpdate(PersistentTransaction transaction) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "commitUpdate", transaction);

        AbstractItem item = null;
        boolean linkHasBecomeReleasable = false;
        synchronized (this)
        {
            if (ItemLinkState.STATE_UPDATING_DATA == _itemLinkState)
            {
                _assertCorrectTransaction(transaction);
                item = _getAndAssertItem();

                ListStatistics stats = getParentStatistics();
                synchronized (stats)
                {
                    stats.decrementUpdating();
                    stats.incrementAvailable();
                }

                linkHasBecomeReleasable = _declareDiscardable();
                _itemLinkState = ItemLinkState.STATE_AVAILABLE;
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(this, tc, "commitUpdate");
                throw new StateException(_itemLinkState.toString());
            }
            _transactionId = null;
        }
        // this stuff has to be done outside the synchronized block
        if (linkHasBecomeReleasable)
        {
            _declareReleasable(item);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "commitUpdate");
    }
1206135
@Override
	public void onTxCommit(Transaction tx) {
		if (!tx.isReadOnly() && enableLogging) {
			LogSeqNum lsn = new CommitRecord(txNum).writeToLog();
			VanillaDb.logMgr().flush(lsn);
		}
	}
1281118
void checkClosed() throws FetchException {
        TransactionScope<Txn> scope = localTransactionScope();

        // Lock out shutdown task.
        scope.getLock().lock();
        try {
            if (mPrimaryDatabase == null) {
                // If shutting down, this will force us to block forever.
                try {
                    scope.getTxn();
                } catch (Exception e) {
                    // Don't care.
                }
                // Okay, not shutting down, so throw exception.
                throw new FetchException("Repository closed");
            }
        } finally {
            scope.getLock().unlock();
        }
    }
261735
private CompletableFuture<Void> commitTransactions(String scope, String stream, List<Long> segments,
                                                                     List<UUID> transactionsToCommit) {
        // Chain all transaction commit futures one after the other. This will ensure that order of commit
        // if honoured and is based on the order in the list.
        CompletableFuture<Void> future = CompletableFuture.completedFuture(null);
        for (UUID txnId : transactionsToCommit) {
            log.debug("Committing transaction {} on stream {}/{}", txnId, scope, stream);
            // commit transaction in segment store
            future = future
                    // Note, we can use the same segments and transaction id as only
                    // primary id is taken for creation of txn-segment name and secondary part is erased and replaced with
                    // transaction's epoch.
                    // And we are creating duplicates of txn epoch keeping the primary same.
                    .thenCompose(v -> streamMetadataTasks.notifyTxnCommit(scope, stream, segments, txnId));
        }
        return future;
    }
829866
void preBackout(Transaction transaction)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
1073966
public static function database_transaction_commited() {
        if (self::$dispatching or empty(self::$extbuffer)) {
            return;
        }

        self::$dispatching = true;
        self::process_buffers();
        self::$dispatching = false;
    }
778290
public function commit() {
		if ($this->transactionManager === null) {
			$this->prepareCommit();
			$this->performCommit();
		}
		
		if ($this->transactionManager->hasOpenTransaction()) {
			$this->transactionManager->getRootTransaction()->commit();
		}
	}
888680
public void rollback() {
		for (TransactionLifecycleListener l : lifecycleListeners) {

			l.onTxRollback(this);
		}

		if (logger.isLoggable(Level.FINE))
			logger.fine("transaction " + txNum + " rolled back");
	}
46247
public void localBegin()
    {
        if (this.isInLocalTransaction)
        {
            throw new TransactionInProgressException("Connection is already in transaction");
        }
        Connection connection = null;
        try
        {
            connection = this.getConnection();
        }
        catch (LookupException e)
        {
            /**
             * must throw to notify user that we couldn't start a connection
             */
            throw new PersistenceBrokerException("Can't lookup a connection", e);
        }
        if (log.isDebugEnabled()) log.debug("localBegin was called for con " + connection);
        // change autoCommit state only if we are not in a managed environment
        // and it is enabled by user
        if(!broker.isManaged())
        {
            if (jcd.getUseAutoCommit() == JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE)
            {
                if (log.isDebugEnabled()) log.debug("Try to change autoCommit state to 'false'");
                platform.changeAutoCommitState(jcd, connection, false);
            }
        }
        else
        {
            if(log.isDebugEnabled()) log.debug(
                        "Found managed environment setting in PB, will skip Platform.changeAutoCommitState(...) call");
        }
        this.isInLocalTransaction = true;
    }
83993
private void enlistTransaction() {

        this.cleanupTransactionBinding();

        TransactionBindingType transactionBindingType = this.transactionBinding.getTransactionBindingType();

        // not associated to global transaction, try to associate a global
        // transaction
        if (this.isInGlobalTransaction() && transactionBindingType != TransactionBindingType.GlobalTransaction) {
            try {
                Transaction ntx = this.transactionManager.getTransaction();
                
                // Bitronix calls start on reaction of enlist --- check if cycle
                if (!enlisted && ntx != null) {
                    this.enlisted = true;
                    // enlisted makes startTransaactionalBranch calling
                    this.enlisted = ntx.enlistResource(this.xaResource);
                    if (!enlisted) {
                        LOG.error("Enlisting " + xaResource + " failed");
                    } else {

                    }
                } else {
                    LOG.debug("SampleXAConnection:connectionRequiresTransaction (no globalTransaction found)");
                }
            } catch (RollbackException n) {
                LOG.error("SampleXAConnection:prevokeAction enlistResource exception : " + n.toString());
            } catch (SystemException n) {
                LOG.error("SampleXAConnection:connectionRequiresTransaction " + n + "\n"
                        + ExceptionUtils.getStackTrace(n));
                throw new DelegatedRuntimeException(n);
            }
        } else if (transactionBindingType == TransactionBindingType.NoTransaction) {
            this.transactionBinding.activateLocalTransaction(new LocalTransactionProxy<C>(this.managedConnectionFactory
                    .getManagedConnection()));
        } else { // In Global Transaction and associated to a global transaction
                 // => nothing to do
            if (this.isInGlobalTransaction() && transactionBindingType == TransactionBindingType.GlobalTransaction) {
                // Not in Global Transaction and associated to a local
                // transaction => nothing to do
            } else if (!this.isInGlobalTransaction()
                    && transactionBindingType == TransactionBindingType.LocalTransaction) {
            }
        }

    }
651831
protected synchronized void doWriteObjects(boolean isFlush) throws TransactionAbortedException, LockNotGrantedException
    {
        /*
        arminw:
        if broker isn't in PB-tx, start tx
        */
        if (!getBroker().isInTransaction())
        {
            if (log.isDebugEnabled()) log.debug("call beginTransaction() on PB instance");
            broker.beginTransaction();
        }

        // Notify objects of impending commits.
        performTransactionAwareBeforeCommit();

        // Now perfom the real work
        objectEnvelopeTable.writeObjects(isFlush);
        // now we have to perform the named objects
        namedRootsMap.performDeletion();
        namedRootsMap.performInsert();
        namedRootsMap.afterWriteCleanup();
    }
321068
private void fireOnSelectTransaction(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onSelect(e);
        }
    }
1283708
@Override
    public void rollback() throws DataCorruptedException, IOException, IllegalStateException
    {
        try {
            this.txContext.abort();
        } catch (final Exception e) {
            throw new DataCorruptedException("Error trying to rollback a Transaction.", e);
        }
    }
871230
void prePrepare(Transaction transaction)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
937408
public static void reportOpenTransactions(String scope, String streamName, int ongoingTransactions) {
        DYNAMIC_LOGGER.reportGaugeValue(OPEN_TRANSACTIONS, ongoingTransactions, streamTags(scope, streamName));
    }
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);
            }
        }
    }