Class TSXaTransaction
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.TSXaTransaction
Class representing one Global Transaction.
- Version:
- 1.0, 06/06/02
- Author:
- Binod P.G
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the connection to this transaction.void
commit
(boolean onePhase) Commits this Transaction.int
Get the status of the transaction.int
prepare()
Prepare the transaction.Check for the key in the transaction.void
rollback()
Rolls back the transactionvoid
setStatus
(int status) Sets the Status of the transaction.
-
Constructor Details
-
TSXaTransaction
Creates a new Global Transaction object.- Parameters:
id
- Global Transaction Identifier.
-
-
Method Details
-
addConnection
Adds the connection to this transaction.- Parameters:
con
- Connection involved in the transaction branch.
-
setStatus
public void setStatus(int status) Sets the Status of the transaction.- Parameters:
Status
- of the transaction
-
getStatus
public int getStatus()Get the status of the transaction.- Returns:
- Status of the transaction.
-
prepare
Prepare the transaction.- Returns:
- The Vote of this branch in this transaction.
- Throws:
XAException
- If prepare fails.
-
commit
Commits this Transaction.- Parameters:
Boolean
- indicating, whether it is a single-phase or 2-phase commit.- Throws:
XAException
- If commit fails.
-
rollback
public void rollback()Rolls back the transaction -
read
Check for the key in the transaction. If it is not readable return null.- Parameters:
elementkey
- Key to be read.- Returns:
- DataElement object.
- Throws:
TSEISException
- In case, read fails.
-