Package org.forgerock.openidm.repo.jdbc
Interface SQLExceptionHandler
- All Known Implementing Classes:
DB2SQLExceptionHandler,DefaultSQLExceptionHandler,MSSQLExceptionHandler,MySQLExceptionHandler
public interface SQLExceptionHandler
Interface to help handle SQLExceptions across different DB implementations
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisErrorType(SQLException ex, ErrorType errorType) Query if a given exception signifies a well known error type Allows table handlers to abstract database specific differences in reporting errors.booleanisRetryable(SQLException ex, Connection connection) As whether a given exception should be retried
-
Method Details
-
isErrorType
Query if a given exception signifies a well known error type Allows table handlers to abstract database specific differences in reporting errors.- Parameters:
ex- The exception thrown by the databaseerrorType- the error type to test against- Returns:
- true if the exception matches the error type passed
-
isRetryable
As whether a given exception should be retried- Parameters:
ex- the exception thrown by the databaseconnection- where the failure occured, used for additional context- Returns:
- true if the expectation is that transaction should be retried by the application
-