Interface BrokeredConnectionControl

All Known Implementing Classes:
EmbedPooledConnection, EmbedXAConnection

public interface BrokeredConnectionControl
Provides control over a BrokeredConnection
  • Method Details

    • getRealConnection

      EngineConnection getRealConnection() throws SQLException
      Return the real JDBC connection for the brokered connection.
      Throws:
      SQLException
    • notifyException

      void notifyException(SQLException sqle)
      Notify the control class that a SQLException was thrown during a call on one of the brokered connection's methods.
    • checkAutoCommit

      void checkAutoCommit(boolean autoCommit) throws SQLException
      Allow control over setting auto commit mode.
      Throws:
      SQLException
    • checkSavepoint

      void checkSavepoint() throws SQLException
      Allow control over creating a Savepoint (JDBC 3.0)
      Throws:
      SQLException
    • checkRollback

      void checkRollback() throws SQLException
      Allow control over calling rollback.
      Throws:
      SQLException
    • checkCommit

      void checkCommit() throws SQLException
      Allow control over calling commit.
      Throws:
      SQLException
    • checkClose

      void checkClose() throws SQLException
      Check if the brokered connection can be closed.
      Throws:
      SQLException - if it is not allowed to call close on the brokered connection
    • checkHoldCursors

      int checkHoldCursors(int holdability, boolean downgrade) throws SQLException
      Can cursors be held across commits.
      Parameters:
      downgrade - true to downgrade the holdability, false to throw an exception.
      Throws:
      SQLException
    • isIsolationLevelSetUsingSQLorJDBC

      boolean isIsolationLevelSetUsingSQLorJDBC() throws SQLException
      Returns true if isolation level has been set using JDBC/SQL.
      Throws:
      SQLException
    • resetIsolationLevelFlag

      void resetIsolationLevelFlag() throws SQLException
      Reset the isolation level flag used to keep state in BrokeredConnection. It will get set to true when isolation level is set using JDBC/SQL. It will get reset to false at the start and the end of a global transaction.
      Throws:
      SQLException
    • isInGlobalTransaction

      boolean isInGlobalTransaction()
      Is this a global transaction
      Returns:
      true if this is a global XA transaction
    • closingConnection

      boolean closingConnection() throws SQLException
      Close called on BrokeredConnection. If this call returns true then getRealConnection().close() will be called.
      Throws:
      SQLException
    • wrapStatement

      Statement wrapStatement(Statement realStatement) throws SQLException
      Optionally wrap a Statement with another Statement.
      Throws:
      SQLException
    • wrapStatement

      PreparedStatement wrapStatement(PreparedStatement realStatement, String sql, Object generateKeys) throws SQLException
      Optionally wrap a PreparedStatement with another PreparedStatement.
      Throws:
      SQLException
    • wrapStatement

      CallableStatement wrapStatement(CallableStatement realStatement, String sql) throws SQLException
      Optionally wrap a CallableStatement with an CallableStatement.
      Throws:
      SQLException
    • onStatementClose

      void onStatementClose(PreparedStatement statement)
      Close called on the associated PreparedStatement object
      Parameters:
      statement - PreparedStatement object on which the close event occurred
    • onStatementErrorOccurred

      void onStatementErrorOccurred(PreparedStatement statement, SQLException sqle)
      Error occurred on associated PreparedStatement object
      Parameters:
      statement - PreparedStatement object on which the error occured
      sqle - The SQLExeption that caused the error