[
http://issues.ops4j.org/browse/QI-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13302#action_13302
]
Falko Bräutigam commented on QI-221:
------------------------------------
One strong reason to use Qi4J in my current project was nested UoWs. Still
present in RC1, gone in the final version!? Anyway, I understand that this is a
complex issue. And if it has to be removed to come up with 1.0 release, then it
has to be removed.
However, here is my usecase:
I'm working on a multi-user geospatial app build on eclipse/RAP
(http://polymap.org). So, we are using the eclipse workbench but the system
runs on the server. Undo&redo support is a big advantage for this kind of
application. The eclipse workbench supports this via the operations
infrastructure. Having operations being qi4j transients and bounding each
operation to a nested UoW I can provide full undo support just be writing one
OperationBoundsConcern that rolls back the current nested UoW. (without the
need to write a lot of code in every operation handling this exlicitly).
Maybe I'm missing something and the sematics of a bested Uow wasn't meant to
support this - anyway, in my eyes it was a good idea just because a cannot
provide the undo/redo aka nested UoW semantics from outside the qi4j runtime!
At least currently I dont see how.
After fetching the final 1.0 this morning and finding that nested UoWs were
droped I was thinking about how to provide the undo/redo semantics from the
domain model. There are advantages:
- a) having this in the domain code one can see better what is going on
- b) copy-on-read and copy-on-write, both could be implemented (true?)
disadvantages:
- c) there is no way to decide which method (intercepted by SideEffect or
Concern) changes entity state
- c1) there is no way to check how the entity state was changed
- d) properties and associations do not provide a real rollback / "set back"
For c) one could provide an annotation to mark methods that change the entity
state. For c1) and d) I need to introduce some magic naming conventions and
assumptions about the semantic of setter/getter - which both I don't like.
So, if nested UoW were meant to support the eclipse undo/redo semantics and c)
c1) and d) is true, then IMO nested Uows should be part of the Qi4J API.
> Check nested UnitOfWork code so that it works properly.
> -------------------------------------------------------
>
> Key: QI-221
> URL: http://issues.ops4j.org/browse/QI-221
> Project: Qi4j
> Issue Type: Bug
> Reporter: Rickard Öberg
> Assignee: Rickard Öberg
> Priority: Critical
> Fix For: 1.0
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev