Class AbstractTransactionContext
- java.lang.Object
-
- org.camunda.bpm.engine.impl.cfg.jta.AbstractTransactionContext
-
- All Implemented Interfaces:
TransactionContext
- Direct Known Subclasses:
JakartaTransactionContext
,JtaTransactionContext
public abstract class AbstractTransactionContext extends Object implements TransactionContext
Base class for handling the context of a transaction. Provides template methods for handling transaction contexts.- Author:
- Daniel Meyer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractTransactionContext.TransactionStateSynchronization
-
Field Summary
Fields Modifier and Type Field Description static TransactionLogger
LOG
-
Constructor Summary
Constructors Constructor Description AbstractTransactionContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
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
doRollback()
boolean
isTransactionActive()
protected abstract boolean
isTransactionActiveInternal()
void
rollback()
Rollback the current transaction.
-
-
-
Field Detail
-
LOG
public static final TransactionLogger LOG
-
-
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
-
isTransactionActiveInternal
protected abstract boolean isTransactionActiveInternal() throws Exception
- Throws:
Exception
-
addTransactionListener
protected abstract void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener, CommandContext commandContext) throws Exception
- Throws:
Exception
-
-