Interface GcJdbcConnectionBean

All Known Implementing Classes:
NonPooledConnectionProvider.NonPooledConnectionBean

public interface GcJdbcConnectionBean
bean that wraps connections
  • Method Summary

    Modifier and Type
    Method
    Description
    get a connection (dont close this when done, just call "doneWithConnection()"
    void
    call this when the connection is done.
    void
    call this when the connection is done but there was an error, will pass an exception.
    void
    call this when the connection is not needed, in the finally block this might return to pool.
  • Method Details

    • connection

      Connection connection() throws SQLException
      get a connection (dont close this when done, just call "doneWithConnection()"
      Returns:
      the connection
      Throws:
      SQLException - if there is a problem
    • doneWithConnection

      void doneWithConnection() throws SQLException
      call this when the connection is done. This will do any cleanup this is a null-safe method.
      Throws:
      SQLException - if there is a problem
    • doneWithConnectionFinally

      void doneWithConnectionFinally()
      call this when the connection is not needed, in the finally block this might return to pool. In general, this shouldnt throw exceptions since it is done in a finally block, it should only log them
    • doneWithConnectionError

      void doneWithConnectionError(Throwable t)
      call this when the connection is done but there was an error, will pass an exception. This should do whatever and rethrow the exception as runtime
      Parameters:
      t -