I am using the Axon release (1.3) and I am having some bother when
calling the load(AggregateIdentifier) method on my implementation of a
When I attempt to load a StringAggregateIdentifier that does not exist
- I would expect to be able to catch an AggregateNotFoundException so
that I can take measures in the code to create the Aggregate before
applying the intended command to it.
It seems that my implementation is in fact throwing a
NullPointerException which I am not able to catch before it causes
mayhem with transaction rollbacks...
INFO [org.axonframework.repository.LockingRepository] Exception
occurred while trying to load an aggregate. Releasing lock.
The question I would like to ask is how can I handle situations when
the aggregate returned from the entity manager is null? In the sample
application - there is a seperate repository of contactNames that
checks for uniqueness but there is no obvious handling of how
AggregateNotFoundException... is this still thrown?
Thanks for your time