Skip to content

Instantly share code, notes, and snippets.

@johnou
Created August 5, 2024 13:43
Show Gist options
  • Save johnou/5b5bb578df6da39c43385b078bcaf6fc to your computer and use it in GitHub Desktop.
Save johnou/5b5bb578df6da39c43385b078bcaf6fc to your computer and use it in GitHub Desktop.
SQLExceptionOverride
package org.apache.commons.dbcp2;
import java.sql.SQLException;
public interface SQLExceptionOverride {
/**
* Determines whether a connection should be disconnected based on the provided SQLException.
*
* @param sqlException the SQLException to evaluate
* @return true if the connection should be disconnected, false otherwise
*/
default boolean shouldDisconnectConnection(SQLException sqlException) {
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment