On 8/5/11 14:43 , Niclas Hedhman wrote:
There's a number of issues with that. Dropping references to entities may
leave application references seemingly valid, and yet they are no longer
part of the UoW. With pause/resume it is implicit that after a pause you
don't hold on to entities in the UoW anymore, and upon resume you have to
re-fetch them (maybe this needs to be explicit in docs actually).
Isn't that the same anyway? (I assume we can find a suitable name...)
What happens to the application held entity on pause/resume? It is
obviously not valid when the UoW is suspended, but after? I don't see
the difference, and in both cases it becomes an issue of entity
management, and why I think the Id+Value semantics are easier to deal
with.
Any Entity references held by app after such a "prune" will be unusable,
since the UoW will not know about them, and will not include them in the
commit. The idea is to minimize use of memory.
That being said, there are entirely different ways of looking at this.
For example, in the long-running UoW context, you might hold on to one
UoW *only* for writing, and then create UoW's separately for reading.
Then the write-UoW will be naturally small anyway. So, it might be that
we would be introducing infrastructure stuff that could be just as
easily fixed by having a proper application structure.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev