public class JtaTransactionContext extends Object implements TransactionContext
Modifier and Type | Class and Description |
---|---|
static class |
JtaTransactionContext.TransactionStateSynchronization |
Modifier and Type | Field and Description |
---|---|
static TransactionLogger |
LOG |
protected TransactionManager |
transactionManager |
Constructor and Description |
---|
JtaTransactionContext(TransactionManager transactionManager) |
Modifier and Type | Method and Description |
---|---|
void |
addTransactionListener(TransactionState transactionState,
TransactionListener transactionListener)
Add a
TransactionListener to the current transaction. |
void |
commit()
Commit the current transaction.
|
protected Transaction |
getTransaction() |
boolean |
isTransactionActive() |
void |
rollback()
Rollback the current transaction.
|
public static final TransactionLogger LOG
protected final TransactionManager transactionManager
public JtaTransactionContext(TransactionManager transactionManager)
public void commit()
TransactionContext
commit
in interface TransactionContext
public void rollback()
TransactionContext
rollback
in interface TransactionContext
protected Transaction getTransaction()
public void addTransactionListener(TransactionState transactionState, TransactionListener transactionListener)
TransactionContext
TransactionListener
to the current transaction.addTransactionListener
in interface TransactionContext
transactionState
- the transaction state for which the TransactionListener
should be added.transactionListener
- the TransactionListener
to add.public boolean isTransactionActive()
isTransactionActive
in interface TransactionContext
Copyright © 2019. All rights reserved.