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
Modifier and TypeClassDescriptionprotected class
-
Field Summary
Modifier and TypeFieldDescriptionprotected CommandContext
protected TransactionState
protected org.springframework.transaction.PlatformTransactionManager
-
Constructor Summary
ConstructorDescriptionSpringTransactionContext
(org.springframework.transaction.PlatformTransactionManager transactionManager, CommandContext commandContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTransactionListener
(TransactionState transactionState, TransactionListener transactionListener) Add aTransactionListener
to the current transaction.void
commit()
Commit the current transaction.boolean
void
rollback()
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:TransactionContext
Commit the current transaction.- Specified by:
commit
in interfaceTransactionContext
-
rollback
public void rollback()Description copied from interface:TransactionContext
Rollback the current transaction.- Specified by:
rollback
in interfaceTransactionContext
-
addTransactionListener
public void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener) Description copied from interface:TransactionContext
Add aTransactionListener
to the current transaction.- Specified by:
addTransactionListener
in interfaceTransactionContext
- Parameters:
transactionState
- the transaction state for which theTransactionListener
should be added.transactionListener
- theTransactionListener
to add.
-
isTransactionActive
public boolean isTransactionActive()- Specified by:
isTransactionActive
in interfaceTransactionContext
-