Package org.axonframework.common.jdbc
Interface PersistenceExceptionResolver
- All Known Implementing Classes:
SQLErrorCodesResolver,SQLStateResolver
public interface PersistenceExceptionResolver
The PersistenceExceptionResolver is used to find out if an exception is caused by duplicate keys.
- Since:
- 2.2
- Author:
- Martin Tilma
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisDuplicateKeyViolation(Exception exception) Indicates whether the givenexceptionrepresents a duplicate key violation.
-
Method Details
-
isDuplicateKeyViolation
Indicates 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.- Parameters:
exception- The exception to evaluate- Returns:
trueif the given exception represents a Duplicate Key Violation,falseotherwise.
-