Hi, On Thu, Dec 1, 2011 at 11:07 AM, Michael Dürig <[email protected]> wrote: > Note however, that for the same reason we are currently not able to > guarantee node type consistency: > [...] > Both sessions will successfully complete since for each of them the > consistency property (nt:file cannot have a child named "foo"). holds.
The save() implementation will need to do an internal refresh(true), check any type and other constraints, and only persist the changes if everything is OK. To prevent this from being a too big blocking operation, we can use optimistic locking by making the last step of the process conditional on the repository still being at the state it was when the refresh(true) call was made. Otherwise the refresh-check-persist cycle should be restarted. BR, Jukka Zitting
