Package org.axonframework.common.jdbc
Class JdbcSQLErrorCodesResolver
java.lang.Object
org.axonframework.common.jdbc.JdbcSQLErrorCodesResolver
- All Implemented Interfaces:
PersistenceExceptionResolver
JdbcSQLErrorCodesResolver is an implementation of PersistenceExceptionResolver used to resolve SQL
error codes to see if it is a duplicate key constraint violation.
- Since:
- 2.2
- Author:
- Kristian Rosenvold
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisDuplicateKeyViolation(Exception exception) Indicates whether the givenexceptionrepresents a duplicate key violation.
-
Constructor Details
-
JdbcSQLErrorCodesResolver
public JdbcSQLErrorCodesResolver()
-
-
Method Details
-
isDuplicateKeyViolation
Description copied from interface:PersistenceExceptionResolverIndicates whether the givenexceptionrepresents a duplicate key violation. Typically, duplicate key violations indicates concurrent access to an entity in the application. Two users might be accessing the same Aggregate, for example.- Specified by:
isDuplicateKeyViolationin interfacePersistenceExceptionResolver- Parameters:
exception- The exception to evaluate- Returns:
trueif the given exception represents a Duplicate Key Violation,falseotherwise.
-