Class JnaTransaction

java.lang.Object
org.firebirdsql.gds.ng.AbstractFbTransaction
org.firebirdsql.gds.ng.jna.JnaTransaction
All Implemented Interfaces:
org.firebirdsql.gds.ng.FbTransaction, org.firebirdsql.gds.ng.listeners.ExceptionListenable

public class JnaTransaction extends org.firebirdsql.gds.ng.AbstractFbTransaction
Implementation of FbTransaction for native client access.
Since:
3.0
Author:
Mark Rotteveel
  • Field Summary

    Fields inherited from class org.firebirdsql.gds.ng.AbstractFbTransaction

    exceptionListenerDispatcher, transactionListenerDispatcher
  • Constructor Summary

    Constructors
    Constructor
    Description
    JnaTransaction(JnaDatabase database, com.sun.jna.ptr.IntByReference transactionHandle, org.firebirdsql.gds.ng.TransactionState initialState)
    Initializes AbstractFbTransaction.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    int
     
    com.sun.jna.ptr.IntByReference
     
    byte[]
    getTransactionInfo(byte[] requestItems, int maxBufferLength)
     
    void
    prepare(byte[] recoveryInformation)
     
    void
     

    Methods inherited from class org.firebirdsql.gds.ng.AbstractFbTransaction

    addExceptionListener, addTransactionListener, addWeakTransactionListener, getState, getTransactionId, getTransactionInfo, logUnexpectedState, removeExceptionListener, removeTransactionListener, switchState, withLock

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JnaTransaction

      public JnaTransaction(JnaDatabase database, com.sun.jna.ptr.IntByReference transactionHandle, org.firebirdsql.gds.ng.TransactionState initialState)
      Initializes AbstractFbTransaction.
      Parameters:
      database - FbDatabase that created this handle.
      transactionHandle - Transaction handle
      initialState - Initial transaction state (allowed values are TransactionState.ACTIVE and TransactionState.PREPARED)
  • Method Details

    • getDatabase

      public JnaDatabase getDatabase()
      Overrides:
      getDatabase in class org.firebirdsql.gds.ng.AbstractFbTransaction
    • getHandle

      public int getHandle()
    • getJnaHandle

      public com.sun.jna.ptr.IntByReference getJnaHandle()
    • commit

      public void commit() throws SQLException
      Throws:
      SQLException
    • rollback

      public void rollback() throws SQLException
      Throws:
      SQLException
    • prepare

      public void prepare(byte[] recoveryInformation) throws SQLException
      Throws:
      SQLException
    • getTransactionInfo

      public byte[] getTransactionInfo(byte[] requestItems, int maxBufferLength) throws SQLException
      Throws:
      SQLException