On 2016-04-18 17:22, Ancona Francesco wrote:
I try explain the case.

We know that OAK doesnt'support Transaction, so the following should be
the JCR implementation:

http://www.day.com/specs/jcr/2.0/10_Writing.html

When i use session write-methods, i can execute a sequence of session
methods (example add nodes) but only when i use save method i persist
the changes.

Instead when i use Workspace-Write Methods (example
VersionManager.checkin, checkout, checkpoint, restore, restoreByLabel,
merge, cancelMerge, doneMerge, createActivity , removeActivity and
createConfiguration), for each action i persist on the workspace.

So, imagine a use case in which i must create a version of a document
and  save it in my repository in atomic way; if the first phase works
but the second one is KO, we have inconsistent data: the document has a
new version but is not saved.

*Which kind of workaround do you suggest to solve this problem ?*

Thanks in advance,

best regards

OK, so first of all this has *nothing* to do with the RDB persistence in particular; it applies to all persistence modes of OAK.

Furthermore, I don't agree this is a "major" problem. Yes, there are certain sequences that can't be done atomically; this is intentional design constraint of Oak (of now). It's not entirely clear to me why this isn't something that application logic can't deal with.

Best regards, Julian

Reply via email to