org.axonframework.common.jdbc
Interface PersistenceExceptionResolver

All Known Subinterfaces:
PersistenceExceptionResolver
All Known Implementing Classes:
JdbcSQLErrorCodesResolver, 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
 boolean isDuplicateKeyViolation(Exception exception)
          Indicates whether the given exception represents a duplicate key violation.
 

Method Detail

isDuplicateKeyViolation

boolean isDuplicateKeyViolation(Exception exception)
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.

Parameters:
exception - The exception to evaluate
Returns:
true if the given exception represents a Duplicate Key Violation, false otherwise.


Copyright © 2010-2016. All Rights Reserved.