public final class NoClientTransactions extends Transactions
Transactions that does not even check whether there is a current transaction and instead always
attempts to create a transaction within the SessionCache.save() calls. This is more efficient when the repository can
be set up to never use container-managed or user-managed transactions.| Modifier and Type | Class and Description |
|---|---|
protected class |
NoClientTransactions.NoClientTransaction |
Transactions.BaseTransaction, Transactions.SimpleTransaction, Transactions.TraceableSimpleTransaction, Transactions.Transaction, Transactions.TransactionFunction| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<NoClientTransactions.NoClientTransaction> |
ACTIVE_TRANSACTION
During ws cache initialization (either when the repo starts up of a new ws is created), there can be a case of semantically
nested simple transactions, so we need effective make sure that only 1 instance of an active transaction can exist at any
given time.
|
logger, monitorFactory, txnMgr| Constructor and Description |
|---|
NoClientTransactions(SessionEnvironment.MonitorFactory monitorFactory,
TransactionManager txnMgr)
Creates a new instance passing in the given monitor factory and transaction manager
|
| 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.
|
currentTransactionId, getTransactionManager, isCurrentlyInTransaction, newMonitor, resume, suspend, updateCacheprotected static final ThreadLocal<NoClientTransactions.NoClientTransaction> ACTIVE_TRANSACTION
public NoClientTransactions(SessionEnvironment.MonitorFactory monitorFactory, TransactionManager txnMgr)
monitorFactory - a SessionEnvironment.MonitorFactory instance; never nulltxnMgr - a TransactionManager instance; never nullpublic Transactions.Transaction begin() throws NotSupportedException, SystemException
Transactionsbegin in class TransactionsNotSupportedException - 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.Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.