public class JnaTransaction extends AbstractFbTransaction
FbTransaction for native client access.exceptionListenerDispatcher, transactionListenerDispatcher| Constructor and Description |
|---|
JnaTransaction(JnaDatabase database,
com.sun.jna.ptr.IntByReference transactionHandle,
TransactionState initialState)
Initializes AbstractFbTransaction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Commit the transaction
|
JnaDatabase |
getDatabase() |
int |
getHandle() |
com.sun.jna.ptr.IntByReference |
getJnaHandle() |
byte[] |
getTransactionInfo(byte[] requestItems,
int maxBufferLength)
Performs a transaction info request.
|
void |
prepare(byte[] recoveryInformation)
Prepare the transaction for two-phase commit/rollback.
|
void |
rollback()
Roll back the transaction
|
addExceptionListener, addTransactionListener, addWeakTransactionListener, finalize, getState, getSynchronizationObject, getTransactionId, getTransactionInfo, removeExceptionListener, removeTransactionListener, switchStatepublic JnaTransaction(JnaDatabase database, com.sun.jna.ptr.IntByReference transactionHandle, TransactionState initialState)
database - FbDatabase that created this handle.transactionHandle - Transaction handleinitialState - Initial transaction state (allowed values are TransactionState.ACTIVE
and TransactionState.PREPARED.public JnaDatabase getDatabase()
getDatabase in class AbstractFbTransactionpublic int getHandle()
public com.sun.jna.ptr.IntByReference getJnaHandle()
public void commit()
throws java.sql.SQLException
FbTransactionjava.sql.SQLExceptionpublic void rollback()
throws java.sql.SQLException
FbTransactionjava.sql.SQLExceptionpublic void prepare(byte[] recoveryInformation)
throws java.sql.SQLException
FbTransactionrecoveryInformation - Transaction recovery information (stored in RDB$TRANSACTION_DESCRIPTION of RDB$TRANSACTIONS),
or null to prepare without recovery information.java.sql.SQLExceptionpublic byte[] getTransactionInfo(byte[] requestItems,
int maxBufferLength)
throws java.sql.SQLException
FbTransactionrequestItems - Information items to requestmaxBufferLength - Maximum response buffer length to usemaxBufferLengthjava.sql.SQLException - For errors retrieving the information.Copyright © 2001-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.