Hi Paul,
thanks for the explanation :
The ConcurrentModificationCheckConcern javadoc says that :
It caches the versions of state that it loads, and forgets them when the state is committed. For normal operation this means that it does not have to go down to the underlying store to get the current version. Whenever there is a concurrent modification the store will most likely have to check with the underlying store what the current version is
EntityStateVersions is part of the concrete EntityStoreService and is therefore related to a single VM. To delegate this versioning to a repository
it would be required to develop a alternative Mixin
@Mixins( EntityStateVersions.EntityStatePostgreSQLBackedVersionsMixin.class )
public interface EntityStateVersions
or introduce a dedicated EntityStateXXVersion for those repositories that are capable to offer a "native" versioning.
In general there are very few cases where such isolation/versioning is required but those cases are important. So I guess I have to add here
some code in order to avoid inconsistencies in the repository. A request like
http://host:port/accountings/transfer/from/{id}/to/{id}?amount=50
must be always isolated from any other requests that mutate the corresponding account(s) state.
I;m on the right track or totally wrong ?
Thank you guys.
Cheers,
Jiri