public interface FbTransaction extends ExceptionListenable
All methods defined in this interface are required to notify all SQLException thrown from the methods
defined in this interface.
| Modifier and Type | Method and Description |
|---|---|
void |
addTransactionListener(TransactionListener listener)
Adds a
TransactionListener to the list of strongly referenced listeners. |
void |
addWeakTransactionListener(TransactionListener listener)
Adds a
TransactionListener to the list of weakly referenced listeners. |
void |
commit()
Commit the transaction
|
int |
getHandle() |
TransactionState |
getState() |
long |
getTransactionId()
Retrieves the transaction id.
|
byte[] |
getTransactionInfo(byte[] requestItems,
int maxBufferLength)
Performs a transaction info request.
|
<T> T |
getTransactionInfo(byte[] requestItems,
int bufferLength,
InfoProcessor<T> infoProcessor)
Request transaction info.
|
void |
prepare(byte[] recoveryInformation)
Prepare the transaction for two-phase commit/rollback.
|
void |
removeTransactionListener(TransactionListener listener)
Removes the
TransactionListener from the list of listeners. |
void |
rollback()
Roll back the transaction
|
addExceptionListener, removeExceptionListenerTransactionState getState()
int getHandle()
void addTransactionListener(TransactionListener listener)
TransactionListener to the list of strongly referenced listeners.listener - TransactionListener to registervoid addWeakTransactionListener(TransactionListener listener)
TransactionListener to the list of weakly referenced listeners.
If the listener is already strongly referenced, this call will be ignored
listener - TransactionListener to registervoid removeTransactionListener(TransactionListener listener)
TransactionListener from the list of listeners.listener - TransactionListener to removevoid commit()
throws java.sql.SQLException
java.sql.SQLExceptionvoid rollback()
throws java.sql.SQLException
java.sql.SQLExceptionvoid prepare(byte[] recoveryInformation)
throws java.sql.SQLException
recoveryInformation - Transaction recovery information (stored in RDB$TRANSACTION_DESCRIPTION of RDB$TRANSACTIONS),
or null to prepare without recovery information.java.sql.SQLException<T> T getTransactionInfo(byte[] requestItems,
int bufferLength,
InfoProcessor<T> infoProcessor)
throws java.sql.SQLException
requestItems - Array of info items to requestbufferLength - Response buffer length to useinfoProcessor - Implementation of InfoProcessor to transform
the info responsejava.sql.SQLException - For errors retrieving or transforming the response.byte[] getTransactionInfo(byte[] requestItems,
int maxBufferLength)
throws java.sql.SQLException
requestItems - Information items to requestmaxBufferLength - Maximum response buffer length to usemaxBufferLengthjava.sql.SQLException - For errors retrieving the information.long getTransactionId()
throws java.sql.SQLException
The transaction id is the database transaction id, not to be confused with the attachment level transaction
handle provided by getHandle().
java.sql.SQLExceptionCopyright © 2001-2022 Jaybird (Firebird JDBC/JCA) team. All rights reserved.