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()
TransactionContext
commit
in interface TransactionContext
public void rollback()
TransactionContext
rollback
in interface TransactionContext
public void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener)
TransactionContext
TransactionListener
to the current transaction.addTransactionListener
in interface TransactionContext
transactionState
- the transaction state for which the TransactionListener
should be added.transactionListener
- the TransactionListener
to add.public boolean isTransactionActive()
isTransactionActive
in interface TransactionContext
Copyright © 2019. All rights reserved.