public class SpringTransactionContext extends Object implements TransactionContext
| Modifier and Type | Class and Description |
|---|---|
protected class |
SpringTransactionContext.TransactionSynchronizationAdapter |
| Modifier and Type | Field and Description |
|---|---|
protected CommandContext |
commandContext |
protected TransactionState |
lastTransactionState |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
| Constructor and Description |
|---|
SpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager,
CommandContext commandContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTransactionListener(TransactionState transactionState,
TransactionListener transactionListener)
Add a
TransactionListener to the current transaction. |
void |
commit()
Commit the current transaction.
|
boolean |
isTransactionActive() |
void |
rollback()
Rollback the current transaction.
|
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected CommandContext commandContext
protected TransactionState lastTransactionState
public SpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager,
CommandContext commandContext)
public void commit()
TransactionContextcommit in interface TransactionContextpublic void rollback()
TransactionContextrollback in interface TransactionContextpublic void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener)
TransactionContextTransactionListener to the current transaction.addTransactionListener in interface TransactionContexttransactionState - the transaction state for which the TransactionListener should be added.transactionListener - the TransactionListener to add.public boolean isTransactionActive()
isTransactionActive in interface TransactionContextCopyright © 2018. All rights reserved.