public class StandaloneTransactionContext extends Object implements TransactionContext
| Modifier and Type | Field and Description | 
|---|---|
| protected CommandContext | commandContext | 
| protected Map<TransactionState,List<TransactionListener>> | stateTransactionListeners | 
| Constructor and Description | 
|---|
| StandaloneTransactionContext(CommandContext commandContext) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addTransactionListener(TransactionState transactionState,
                      TransactionListener transactionListener)Add a  TransactionListenerto the current transaction. | 
| void | commit()Commit the current transaction. | 
| protected void | fireTransactionEvent(TransactionState transactionState) | 
| boolean | isTransactionActive() | 
| void | rollback()Rollback the current transaction. | 
| protected void | setLastTransactionState(TransactionState transactionState) | 
protected CommandContext commandContext
protected Map<TransactionState,List<TransactionListener>> stateTransactionListeners
public StandaloneTransactionContext(CommandContext commandContext)
public 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 void commit()
TransactionContextcommit in interface TransactionContextprotected void fireTransactionEvent(TransactionState transactionState)
protected void setLastTransactionState(TransactionState transactionState)
public void rollback()
TransactionContextrollback in interface TransactionContextpublic boolean isTransactionActive()
isTransactionActive in interface TransactionContextCopyright © 2018. All rights reserved.