Class StandaloneTransactionContext
- java.lang.Object
-
- org.camunda.bpm.engine.impl.cfg.standalone.StandaloneTransactionContext
-
- All Implemented Interfaces:
TransactionContext
public class StandaloneTransactionContext extends java.lang.Object implements TransactionContext
- Author:
- Sebastian Menski
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandContextcommandContextprotected java.util.Map<TransactionState,java.util.List<TransactionListener>>stateTransactionListeners
-
Constructor Summary
Constructors Constructor Description StandaloneTransactionContext(CommandContext commandContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTransactionListener(TransactionState transactionState, TransactionListener transactionListener)Add aTransactionListenerto the current transaction.voidcommit()Commit the current transaction.protected voidfireTransactionEvent(TransactionState transactionState)booleanisTransactionActive()voidrollback()Rollback the current transaction.protected voidsetLastTransactionState(TransactionState transactionState)
-
-
-
Field Detail
-
commandContext
protected CommandContext commandContext
-
stateTransactionListeners
protected java.util.Map<TransactionState,java.util.List<TransactionListener>> stateTransactionListeners
-
-
Constructor Detail
-
StandaloneTransactionContext
public StandaloneTransactionContext(CommandContext commandContext)
-
-
Method Detail
-
addTransactionListener
public void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener)
Description copied from interface:TransactionContextAdd aTransactionListenerto the current transaction.- Specified by:
addTransactionListenerin interfaceTransactionContext- Parameters:
transactionState- the transaction state for which theTransactionListenershould be added.transactionListener- theTransactionListenerto add.
-
commit
public void commit()
Description copied from interface:TransactionContextCommit the current transaction.- Specified by:
commitin interfaceTransactionContext
-
fireTransactionEvent
protected void fireTransactionEvent(TransactionState transactionState)
-
setLastTransactionState
protected void setLastTransactionState(TransactionState transactionState)
-
rollback
public void rollback()
Description copied from interface:TransactionContextRollback the current transaction.- Specified by:
rollbackin interfaceTransactionContext
-
isTransactionActive
public boolean isTransactionActive()
- Specified by:
isTransactionActivein interfaceTransactionContext
-
-