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, switchState
public 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 AbstractFbTransaction
public int getHandle()
public com.sun.jna.ptr.IntByReference getJnaHandle()
public void commit() throws java.sql.SQLException
FbTransaction
java.sql.SQLException
public void rollback() throws java.sql.SQLException
FbTransaction
java.sql.SQLException
public void prepare(byte[] recoveryInformation) throws java.sql.SQLException
FbTransaction
recoveryInformation
- Transaction recovery information (stored in RDB$TRANSACTION_DESCRIPTION of RDB$TRANSACTIONS),
or null
to prepare without recovery information.java.sql.SQLException
public byte[] getTransactionInfo(byte[] requestItems, int maxBufferLength) throws java.sql.SQLException
FbTransaction
requestItems
- Information items to requestmaxBufferLength
- Maximum response buffer length to usemaxBufferLength
java.sql.SQLException
- For errors retrieving the information.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.