Package org.camunda.bpm.engine.spring
Class SpringTransactionContext
java.lang.Object
org.camunda.bpm.engine.spring.SpringTransactionContext
- All Implemented Interfaces:
TransactionContext
- Author:
- Frederik Heremans, Joram Barrez
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandContextprotected TransactionStateprotected org.springframework.transaction.PlatformTransactionManager -
Constructor Summary
ConstructorsConstructorDescriptionSpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager, CommandContext commandContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransactionListener(TransactionState transactionState, TransactionListener transactionListener) Add aTransactionListenerto the current transaction.voidcommit()Commit the current transaction.booleanvoidrollback()Rollback the current transaction.
-
Field Details
-
transactionManager
protected org.springframework.transaction.PlatformTransactionManager transactionManager -
commandContext
-
lastTransactionState
-
-
Constructor Details
-
SpringTransactionContext
public SpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager, CommandContext commandContext)
-
-
Method Details
-
commit
public void commit()Description copied from interface:TransactionContextCommit the current transaction.- Specified by:
commitin interfaceTransactionContext
-
rollback
public void rollback()Description copied from interface:TransactionContextRollback the current transaction.- Specified by:
rollbackin interfaceTransactionContext
-
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.
-
isTransactionActive
public boolean isTransactionActive()- Specified by:
isTransactionActivein interfaceTransactionContext
-