public abstract class TransactionManager extends Object
Constructor and Description |
---|
TransactionManager() |
Modifier and Type | Method and Description |
---|---|
abstract TxContext |
currentTransaction()
The currentTransaction method returns the TxContext for the current
transaction, or null if there is none.
|
abstract void |
enlistForDurableTwoPhase(Durable2PCParticipant tpp,
String id)
Enlist the specified participant with current transaction such that it
will participate in the 2PC protocol; a unique identifier for the
participant is also required.
|
abstract void |
enlistForVolatileTwoPhase(Volatile2PCParticipant pzp,
String id)
Enlist the specified participant with current transaction such that it
will participate in the Volatile 2PC protocol; a unique identifier for
the participant is also required.
|
static TransactionManager |
getTransactionManager()
Get the transaction manager.
|
abstract int |
replay() |
abstract void |
resume(TxContext txContext)
The resume method can be used to (re-)associate a thread with a
transaction(s) via its TxContext.
|
static void |
setTransactionManager(TransactionManager manager)
Set the transaction manager.
|
abstract TxContext |
suspend()
A thread of control may require periods of non-transactionality so that
it may perform work that is not associated with a specific transaction.
|
public static TransactionManager getTransactionManager()
public static void setTransactionManager(TransactionManager manager)
manager
- The transaction manager.public abstract void enlistForVolatileTwoPhase(Volatile2PCParticipant pzp, String id) throws WrongStateException, UnknownTransactionException, SystemException
public abstract void enlistForDurableTwoPhase(Durable2PCParticipant tpp, String id) throws WrongStateException, UnknownTransactionException, SystemException
public abstract int replay() throws SystemException
SystemException
public abstract void resume(TxContext txContext) throws UnknownTransactionException, SystemException
public abstract TxContext suspend() throws SystemException
SystemException
public abstract TxContext currentTransaction() throws SystemException
SystemException
Copyright © 2016 JBoss by Red Hat. All rights reserved.