Interface SQLExceptionOverride


  • public interface SQLExceptionOverride
    Users can implement this interface to override the default SQLException handling of HikariCP. When a SQLException is thrown from JDBC execution methods, the SQLState and error code will be checked to determine if the connection should be evicted from the pool.

    By supplying an implementation of this interface, users can override the default handling of SQLExceptions. The adjudicate(SQLException) method will be called with the SQLException that was thrown. If the method returns SQLExceptionOverride.Override.CONTINUE_EVICT the customary built-in handling will occur. If the method returns SQLExceptionOverride.Override.DO_NOT_EVICT the eviction will be elided. If the method returns SQLExceptionOverride.Override.MUST_EVICT the eviction will be evicted regardless of the SQLState or error code.