Class AbstractTransactionContext
java.lang.Object
org.camunda.bpm.engine.impl.cfg.jta.AbstractTransactionContext
- All Implemented Interfaces:
TransactionContext
- Direct Known Subclasses:
JakartaTransactionContext
,JtaTransactionContext
Base class for handling the context of a transaction. Provides template
methods for handling transaction contexts.
- Author:
- Daniel Meyer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTransactionListener
(TransactionState transactionState, TransactionListener transactionListener) Add aTransactionListener
to the current transaction.protected abstract void
addTransactionListener
(TransactionState transactionState, TransactionListener transactionListener, CommandContext commandContext) void
commit()
Commit the current transaction.protected abstract void
boolean
protected abstract boolean
void
rollback()
Rollback the current transaction.
-
Field Details
-
LOG
-
-
Constructor Details
-
AbstractTransactionContext
public AbstractTransactionContext()
-
-
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
-
doRollback
- Throws:
Exception
-
isTransactionActiveInternal
- Throws:
Exception
-
addTransactionListener
protected abstract void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener, CommandContext commandContext) throws Exception - Throws:
Exception
-