Package org.axonframework.modelling
Class RepositoryAlreadyRegisteredException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.modelling.RepositoryAlreadyRegisteredException
- All Implemented Interfaces:
Serializable
Exception thrown by the
StateManager when trying to register an Repository for a combination of
entity type and id type for which a repository was already registered. Super- or subtypes are considered a match of
each other, so the repository can unambiguously resolve an Repository for a given combination of entity type
and id type and prevent runtime errors.- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryAlreadyRegisteredException(Repository<?, ?> repository, Repository<?, ?> existingRepository) Initialize the exception with a message that contains the types of the conflicting repositories. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RepositoryAlreadyRegisteredException
public RepositoryAlreadyRegisteredException(Repository<?, ?> repository, Repository<?, ?> existingRepository) Initialize the exception with a message that contains the types of the conflicting repositories.- Parameters:
repository- The repository that was attempted to be registered.existingRepository- The repository that was already registered for the conflicting entity type.
-