public class TransactionResourceManager extends Object
TransactionResourceManager registry for transaction contexts.| Modifier and Type | Method and Description |
|---|---|
void |
beginXATransaction(String transactionId,
int transactionBlockId,
XAResource xaResource)
This method starts a transaction for the given xa resource.
|
static TransactionResourceManager |
getInstance() |
boolean |
notifyAbort(String transactionId,
int transactionBlockId,
boolean isRetryAttempt)
This method acts as the callback which aborts all the resources participated in the given transaction.
|
boolean |
notifyCommit(String transactionId,
int transactionBlockId)
This method acts as the callback which commits all the resources participated in the given transaction.
|
boolean |
prepare(String transactionId,
int transactionBlockId)
This method acts as the callback which notify all the resources participated in the given transaction.
|
void |
register(String transactionId,
int transactionBlockId,
BallerinaTransactionContext txContext)
This method will register connection resources with a particular transaction.
|
void |
registerAbortedFunction(int transactionBlockId,
BFunctionPointer bFunctionPointer)
This method will register an aborted function handler of a particular transaction.
|
void |
registerCommittedFunction(int transactionBlockId,
BFunctionPointer bFunctionPointer)
This method will register a committed function handler of a particular transaction.
|
public static TransactionResourceManager getInstance()
public void register(String transactionId, int transactionBlockId, BallerinaTransactionContext txContext)
transactionId - the global transaction id.transactionBlockId - the block id of the transaction.txContext - ballerina transaction context which includes the underlying connection info.public void registerCommittedFunction(int transactionBlockId,
BFunctionPointer bFunctionPointer)
transactionBlockId - the block id of the transaction.
param bFunctionPointer the function pointer for the committed function.public void registerAbortedFunction(int transactionBlockId,
BFunctionPointer bFunctionPointer)
transactionBlockId - the block id of the transaction.
param bFunctionPointer the function pointer for the aborted function.public boolean prepare(String transactionId, int transactionBlockId)
transactionId - the global transaction id.transactionBlockId - the block id of the transaction.public boolean notifyCommit(String transactionId, int transactionBlockId)
transactionId - the global transaction id.transactionBlockId - the block id of the transaction.public boolean notifyAbort(String transactionId, int transactionBlockId, boolean isRetryAttempt)
transactionId - the global transaction id.transactionBlockId - the block id of the transaction.public void beginXATransaction(String transactionId, int transactionBlockId, XAResource xaResource)
transactionId - the global transaction id.xaResource - the XA resource which participates in the transaction.Copyright © 2018 WSO2. All rights reserved.