philippe van dyck wrote:
since it has been removed, what is the strategy when I receive a concurrent exception ?

With this simple use case
1) uow updating entities
2) uow reading entities

1) receives a concurrent exception -> I really need to replay this one
2) receives a concurrent exception -> I can discard it
1+2) receives both a concurrent exception (can this happen?) -> I need to replay 1)

Is there an easy way to know if an uow contains "updating" elements ? How can I replay an uow ?

This is a real problem since my web frontends could be used by click maniacs and it is really easy to be concurrent with the backend (receiving hardware events)

How do you manage that ?

In my own case I have code in my outermost web layer that starts a UoW, then invokes my web REST resources, which calls the domain layer. When the code finishes and the web layer calls UoW.complete() (if it was a PUT, POST or DELETE) and I get a concurrent exception, then I just throw the UoW away and try again. For GET requests I do uow.discard(), as I can assume it was a read-only request.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to