org.axonframework.eventstore.jpa
Interface PersistenceExceptionResolver
- All Known Implementing Classes:
- SQLErrorCodesResolver
public interface PersistenceExceptionResolver
The PersistenceExceptionResolver is used to find out if an exception is caused by duplicate keys.
- Since:
- 0.7
- Author:
- Martin Tilma
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 © 2011. All Rights Reserved.