Tell the TransactionManager to resume the given transaction

@param tx the transaction to suspend. May be <code>null</code>.
18243
public void resume(Transaction tx) {
		try {
			if ( tx != null ) {
				tm.resume( tx );
			}
		}
		catch (Exception e) {
			throw log.cannotResumeTx( e );
		}
	}
757131
@Override
    public void terminateTransaction()
    {
        if (tmLog.isDebugEnabled()) {
            tmLog.debug("Aborting transaction: " + TxnEgo.txnIdToString(txnId));
        }
        FragmentTaskMessage dummy = new FragmentTaskMessage(0L, 0L, 0L, 0L, false, false, false,
                m_nPartTxn, m_restartTimestamp);
        FragmentResponseMessage poison = new FragmentResponseMessage(dummy, 0L);
        TransactionTerminationException termination = new TransactionTerminationException(
                "Transaction interrupted.", txnId);
        poison.setStatus(FragmentResponseMessage.TERMINATION, termination);
        offerReceivedFragmentResponse(poison);
     }
560150
private final void complete(boolean reUse,
                                Transaction transaction)
                    throws ObjectManagerException {
        final String methodName = "complete";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass, methodName, new Object[] { new Boolean(reUse),
                                                                transaction });

        // No longer any need to include this transaction in a Checkpoint.
        requiresPersistentCheckpoint = false;
        // Clear any remaining state.
        logicalUnitOfWork.XID = null;
        transactionLock = new TransactionLock(this);
        includedManagedObjects.clear();
        callbackTokens.clear();
        allPersistentTokensToNotify.clear();
        loggedSerializedBytes.clear();
        logSequenceNumbers.clear();
        managedObjectSequenceNumbers.clear();
        useCount++;

        if (reUse) { // Reset the transaction for further use.
            // Note that we do not clear the transactionReference because the caller is still holding it.
            // If the caller releases his reference then the reference will be found by ObjectManagerState
            // and this InternalTransaction may be reused for another external Transaction.

        } else { // Do not chain.
            // Make sure the external Transaction cannot reach this internal one.
            transaction.internalTransaction = objectManagerState.dummyInternalTransaction;
            // This may not be sufficient to prevent its being used if the external Transaction already has passed
            // the point where it has picked up the referenece to the Internaltransaction. Hence we terminate the
            // InternalTransaction if it is preemptively backed out. See ObjectManagerstate.performCheckpoint()
            // where transactions are backed out without holding the internal transaction synchronize lock.
            if (transactionReference != null)
                transactionReference.clear(); // Inhibt an enqueue of the transactionReference.
            // If a reference is enqueued we are already in inactive state for this
            // transactionReferenceSequence so no action will occur.

            // Tell the ObjectManager that we no longer exist as an active transaction.
            objectManagerState.deRegisterTransaction(this);

        } // if (reUse).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
1362503
public void rollbackTransaction() throws MarkLogicTransactionException {
		if(isActiveTransaction()) {
			try {
				sync();
			} catch (MarkLogicSesameException e) {
				throw new MarkLogicTransactionException(e);
			}
			this.tx.rollback();
			this.tx = null;
		}else{
			throw new MarkLogicTransactionException("No active transaction to rollback.");
		}
	}
888680
public void rollback() {
		for (TransactionLifecycleListener l : lifecycleListeners) {

			l.onTxRollback(this);
		}

		if (logger.isLoggable(Level.FINE))
			logger.fine("transaction " + txNum + " rolled back");
	}
1041695
public void registerTransaction(TransactionImpl tran) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "registerTransaction", new Object[] { this, tran });

        _recoveringTransactions.add(tran);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "registerTransaction", _recoveringTransactions.size());
    }
77138
protected void deactivate(ComponentContext context) {
        transactionInflowManagerRef.deactivate(context);

        // TODO remove the following temporary code once the transaction manager provides a proper mechanism to prevent a transaction on multiple threads at once
        SuspendCount suspendCount = suspendCountRef.get();
        if (suspendCount != null)
            ((UOWCurrent) transactionManager).unsetUOWEventListener(suspendCount);
    }
389102
protected void recoveryCompleted(Transaction transaction)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
724544
@Override
    public void rollback() throws DataCorruptedException, IOException, IllegalStateException{
        try {
            tranManager.rollback(t1);
        } catch (Exception e) {
            throw new DataCorruptedException("Error trying to rollback a Transaction.", e);
        }
    }
1186162
def abort_transaction(self):
        
        self._check_ended()

        state = self._transaction.state
        if state is _TxnState.NONE:
            raise InvalidOperation("No transaction started")
        elif state is _TxnState.STARTING:
            # Server transaction was never started, no need to send a command.
            self._transaction.state = _TxnState.ABORTED
            return
        elif state is _TxnState.ABORTED:
            raise InvalidOperation("Cannot call abortTransaction twice")
        elif state in (_TxnState.COMMITTED, _TxnState.COMMITTED_EMPTY):
            raise InvalidOperation(
                "Cannot call abortTransaction after calling commitTransaction")

        try:
            self._finish_transaction_with_retry("abortTransaction", False)
        except (OperationFailure, ConnectionFailure):
            # The transactions spec says to ignore abortTransaction errors.
            pass
        finally:
            self._transaction.state = _TxnState.ABORTED
354746
void addTransactionManager(TransactionManager transactionManager) {
		if (transactionManager == null) return;
		this.transactionManagers.add(new TransactionManagerDefinition(transactionManager.name()));
	}
1102826
synchronized TransactionQueueEvent nextTransactionEvent()
        throws InterruptedException {

        if (mQueue.isEmpty()) {
            if (mIdleTimeout != 0) {
                if (mIdleTimeout < 0) {
                    wait();
                }
                else {
                    wait(mIdleTimeout);
                }
            }
        }

        if (mQueue.isEmpty()) {
            return null;
        }

        return (TransactionQueueEvent)mQueue.removeFirst();
    }
334023
void exited(Transaction txn, Transaction active) {
        TransactionMonitor monitor = mMonitor;
        if (monitor != null) {
            monitor.exited(txn, active);
        }
    }
1049689
public void resume() {
    CountDownLatch latch = suspension.getAndSet(null);
    if (latch != null) {
      suspendBarrier.reset();
      latch.countDown();
    }
  }
296050
protected void modify(Transaction t) {
        try {
            this.lock.writeLock().lock();
            t.perform();
        } finally {
            this.lock.writeLock().unlock();
        }
    }
886593
public final void commitExternal(final PersistentTransaction transaction)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "commitExternal", transaction);
            SibTr.exit(this, tc, "commitExternal");
        }
    }
671931
@Override
	public void undo(Transaction tx) {
		Buffer buff = tx.bufferMgr().pin(blk);
		
		LogSeqNum lsn = tx.recoveryMgr().logSetValClr(this.txNum, buff, offset, val, this.lsn);
		VanillaDb.logMgr().flush(lsn);
		
		buff.setVal(offset, val, tx.getTransactionNumber(), null);
		tx.bufferMgr().unpin(buff);
		// Note that UndoNextLSN should be set to this log record's lsn in order
		// to let RecoveryMgr to skip this log record. Since this record should
		// be undo by the Clr append there.
		// Since Clr is Undo's redo log , here we should log
		// old val setVal log to make this undo procedure be redo during
		// repeat history

	}