Package org.camunda.bpm.engine.spring
Class SpringTransactionContext
- java.lang.Object
-
- org.camunda.bpm.engine.spring.SpringTransactionContext
-
- All Implemented Interfaces:
TransactionContext
public class SpringTransactionContext extends java.lang.Object implements TransactionContext
- Author:
- Frederik Heremans, Joram Barrez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
SpringTransactionContext.TransactionSynchronizationAdapter
-
Field Summary
Fields Modifier and Type Field Description protected CommandContext
commandContext
protected TransactionState
lastTransactionState
protected org.springframework.transaction.PlatformTransactionManager
transactionManager
-
Constructor Summary
Constructors Constructor Description SpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager, CommandContext commandContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTransactionListener(TransactionState transactionState, TransactionListener transactionListener)
Add aTransactionListener
to the current transaction.void
commit()
Commit the current transaction.boolean
isTransactionActive()
void
rollback()
Rollback the current transaction.
-
-
-
Field Detail
-
transactionManager
protected org.springframework.transaction.PlatformTransactionManager transactionManager
-
commandContext
protected CommandContext commandContext
-
lastTransactionState
protected TransactionState lastTransactionState
-
-
Constructor Detail
-
SpringTransactionContext
public SpringTransactionContext(org.springframework.transaction.PlatformTransactionManager transactionManager, CommandContext commandContext)
-
-
Method Detail
-
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
-
-