This project is read-only.

NPersist Feature Guide: Commit regions

Since enforcing optimistic concurrency on single objects is sometimes not enough, NPersist supports that you define commit regions spanning multiple objects. When saving an object inside a commit region, all the objects in the region will be loaded, validation will be performed on them all and finally optimistic concurrency detection is applied on the entire graph.

This allows you to define for example that when an order line is loaded, the order it belongs to and all its sibling order lines should be loaded into memory as well, validated (so that the values on the updated order items don’t break any rules that are calculated on the whole order and all its items) and finally any optimistic concurrency conflicts on any of the other order lines and the order are detected and reported.

Commit regions thus give you the ability to define validation rules for object graphs that will be triggered whenever any of the objects in the graph are modified and to enforce optimistic concurrency conflict detection on the whole graph whenever any of its objects are changed.

More information about commit regions:

Last edited Feb 23, 2008 at 5:28 AM by matshelander, version 5


No comments yet.