Class XAConnectionHandler

java.lang.Object
org.firebirdsql.ds.XAConnectionHandler
All Implemented Interfaces:
InvocationHandler

public class XAConnectionHandler extends Object
InvocationHandler for the logical connection returned by FBXAConnection.
Since:
2.2
Author:
Mark Rotteveel
  • Field Details

  • Constructor Details

  • Method Details

    • isRollbackAllowed

      protected boolean isRollbackAllowed() throws SQLException
      Method to decide if calling rollback on the physical connection for cleanup (in handleClose()) is allowed.

      NOTE: This method is not involved in rollback decisions for calls to the proxy.

      Returns:
      true when calling rollback is allowed
      Throws:
      SQLException
    • invoke

      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable
    • handleClose

      protected void handleClose(boolean notifyOwner) throws SQLException
      Handle Connection.close() method. This implementation closes the connection and associated statements.
      Parameters:
      notifyOwner - true when connection owner should be notified of closure.
      Throws:
      SQLException - if underlying connection threw an exception.
    • getProxy

      protected Connection getProxy()
      Returns:
      Proxy for the Connection object
    • close

      protected void close() throws SQLException
      Closes this PooledConnectionHandler. Intended to be called by the ConnectionPoolDataSource when it wants to forcibly close the logical connection to reuse it.
      Throws:
      SQLException
    • isClosed

      protected boolean isClosed()
    • statementErrorOccurred

      protected void statementErrorOccurred(org.firebirdsql.ds.StatementHandler stmtHandler, SQLException sqle)
    • forgetStatement

      protected void forgetStatement(org.firebirdsql.ds.StatementHandler stmtHandler)
    • closeStatements

      protected void closeStatements() throws SQLException
      Throws:
      SQLException