Hi Alex, this isn't true anymore, the session.save() in the POST Servlet is triggered through the resourceResolver.commit() [0] - and direct session.save() should not be performed anymore - even if switching to jcr api because you act on low level API (e.g. for versioning) you should control commit behavior via the resourceResolver - that way you can ensure that any changes performed in other resourceProviders will be commited as well. I know that the majority of cases will be local JCR repositories but just think of remote sources included via REST Interfaces or the (yet not possible) case that two repos are mounted in one instance (e.g. to separate /content from /apps and /libs).
The mechanism I propose is bound to resourceResolver but does not prevent JCR API access beside the fact that session.save() would not be a complete resourceresolver.commit (which would still have pending changes aka the events). Best regards Dominik [0] https://github.com/apache/sling/blob/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java#L129 Am 25.06.2014 21:50 schrieb "Alexander Klimetschek" <aklim...@adobe.com>: > On 25.06.2014, at 00:27, Dominik Süß <dominik.su...@gmail.com> wrote: > > > All in all using commit hooks seem to require a lot of deep knowledge > about > > Oak while the requirements are solely definable on the sling layer. > > But you exclude any change through the JCR API, for example the sling post > servlet. > > Cheers, > Alex > >