Class JdbcSQLErrorCodesResolver

java.lang.Object
org.axonframework.eventsourcing.eventstore.jdbc.JdbcSQLErrorCodesResolver
All Implemented Interfaces:
PersistenceExceptionResolver

public class JdbcSQLErrorCodesResolver extends Object implements PersistenceExceptionResolver
SQLErrorCodesResolver is an implementation of PersistenceExceptionResolver used to resolve sql error codes to see if it is an duplicate key constraint violation.

Since:
2.2
Author:
Kristian Rosenvold
  • Constructor Details

    • JdbcSQLErrorCodesResolver

      public JdbcSQLErrorCodesResolver()
  • Method Details

    • isDuplicateKeyViolation

      public boolean isDuplicateKeyViolation(Exception exception)
      Description copied from interface: PersistenceExceptionResolver
      Indicates whether the given exception represents 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:
      isDuplicateKeyViolation in interface PersistenceExceptionResolver
      Parameters:
      exception - The exception to evaluate
      Returns:
      true if the given exception represents a Duplicate Key Violation, false otherwise.