public final class SynchronizedTransactions extends Transactions
Transactions
that will attempt to register a Synchronization
with the current transaction.Modifier and Type | Class and Description |
---|---|
protected class |
SynchronizedTransactions.RollbackOnlyTransaction |
protected class |
SynchronizedTransactions.SynchronizedTransaction |
protected class |
SynchronizedTransactions.TransactionTracer |
protected static class |
SynchronizedTransactions.WorkspaceUpdates |
Transactions.BaseTransaction, Transactions.SimpleTransaction, Transactions.TraceableSimpleTransaction, Transactions.Transaction, Transactions.TransactionFunction
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
ACTIVE_TRACE_SYNCHRONIZATIONS |
logger, txnMgr
Constructor and Description |
---|
SynchronizedTransactions(TransactionManager txnMgr)
Creates a new instance which wrapps a transaction manager and monitor factory
|
Modifier and Type | Method and Description |
---|---|
Transactions.Transaction |
begin()
Starts a new transaction if one does not already exist, and associate it with the calling thread.
|
void |
updateCache(WorkspaceCache workspace,
ChangeSet changes,
Transactions.Transaction transaction)
Notify the workspace of the supplied changes, if and when the current transaction is completed.
|
currentTransactionId, getTransactionManager, isCurrentlyInTransaction, resume, suspend
public SynchronizedTransactions(TransactionManager txnMgr)
txnMgr
- a TransactionManager
instance; never nullpublic Transactions.Transaction begin() throws NotSupportedException, SystemException
Transactions
begin
in class Transactions
NotSupportedException
- If the calling thread is already associated with a transaction, and nested transactions are
not supported.SystemException
- If the transaction service fails in an unexpected way.public void updateCache(WorkspaceCache workspace, ChangeSet changes, Transactions.Transaction transaction)
Transactions
updateCache
in class Transactions
workspace
- the workspace to which the changes were made; may not be nullchanges
- the changes; may be null if there are no changestransaction
- the transaction with which the changes were made; may not be nullCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.