public class SpringTransactionManager extends Object implements TransactionManager
PlatformTransactionManager
as
underlying transaction manager.Constructor and Description |
---|
SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Initializes the SpringTransactionManager with the given
transactionManager and the default
transaction definition. |
SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager,
org.springframework.transaction.TransactionDefinition transactionDefinition) |
Modifier and Type | Method and Description |
---|---|
protected void |
commitTransaction(org.springframework.transaction.TransactionStatus status)
Commits the transaction with given
status if the transaction is new and not completed. |
protected void |
rollbackTransaction(org.springframework.transaction.TransactionStatus status)
Rolls back the transaction with given
status if the transaction is new and not completed. |
Transaction |
startTransaction()
Starts a transaction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeInTransaction, fetchInTransaction
public SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.TransactionDefinition transactionDefinition)
transactionManager
- The transaction manager to usetransactionDefinition
- The definition for transactions to createpublic SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
and the default
transaction definition.transactionManager
- the transaction manager to usepublic Transaction startTransaction()
TransactionManager
startTransaction
in interface TransactionManager
protected void commitTransaction(org.springframework.transaction.TransactionStatus status)
status
if the transaction is new and not completed.status
- The status of the transaction to commitprotected void rollbackTransaction(org.springframework.transaction.TransactionStatus status)
status
if the transaction is new and not completed.status
- The status of the transaction to roll backCopyright © 2010–2019. All rights reserved.