public class DbJtxTransactionManager extends JtxTransactionManager
JtxTransactionManager
that uses only one JTX db resource type.
Usually, applications have only one transactional resource type - the database.
This manager just simplifies the usage, nothing more.JtxTransactionManager
ignoreScope, maxResourcesPerTransaction, oneResourceManager, resourceManagers, totalTransactions, txStack, validateExistingTransaction
Constructor and Description |
---|
DbJtxTransactionManager(ConnectionProvider connectionProvider)
Creates db jtx manager and registers new
DbJtxResourceManager . |
DbJtxTransactionManager(DbJtxResourceManager resourceManager)
Creates db jtx manager and registers provided
DbJtxResourceManager . |
Modifier and Type | Method and Description |
---|---|
protected JtxTransaction |
createNewTransaction(JtxTransactionMode tm,
java.lang.Object scope,
boolean active)
Builds new transaction instance.
|
DbJtxTransaction |
requestTransaction(JtxTransactionMode mode) |
DbJtxTransaction |
requestTransaction(JtxTransactionMode mode,
java.lang.Object scope)
Requests transaction with specified
mode . |
associateTransaction, close, continueTx, getMaxResourcesPerTransaction, getTransaction, isAssociatedWithThread, isIgnoreScope, isNewTxScope, isSingleResourceManager, isValidateExistingTransaction, lookupResourceManager, propMandatory, propNever, propNotSupported, propRequired, propRequiresNew, propSupports, registerResourceManager, removeTransaction, setIgnoreScope, setMaxResourcesPerTransaction, setSingleResourceManager, setValidateExistingTransaction, totalActiveThreadTransactions, totalThreadTransactions, totalThreadTransactionsWithStatus, totalTransactions
public DbJtxTransactionManager(DbJtxResourceManager resourceManager)
DbJtxResourceManager
.public DbJtxTransactionManager(ConnectionProvider connectionProvider)
DbJtxResourceManager
.public DbJtxTransaction requestTransaction(JtxTransactionMode mode)
requestTransaction
in class JtxTransactionManager
public DbJtxTransaction requestTransaction(JtxTransactionMode mode, java.lang.Object scope)
mode
.
Depending on propagation behavior, it will return either existing or new transaction.
Only one transaction can be opened over one scope.
The exception may be thrown indicating propagation mismatch.requestTransaction
in class JtxTransactionManager
protected JtxTransaction createNewTransaction(JtxTransactionMode tm, java.lang.Object scope, boolean active)
createNewTransaction
in class JtxTransactionManager
Copyright © 2003-present Jodd Team