Hi, all resource operations are transient, you always have to call commit. But I guess we need to work on the javadocs a little bit to make this clear.
Sling 9 is not released yet, but we're pretty close. Once it's there the javadoc will be there as well. Carsten Alexander Klimetschek wrote > BTW, there is no published javadoc for sling 9, the latest is sling 8 [3], > which does not include the copy/move methods, albeit they are 2 years old [4]. > > [3] > https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html > [4] > https://github.com/apache/sling/commit/6653209154a464f45fa63634af869408d6b84619 > > Cheers, > Alex > >> On 31.05.2017, at 17:34, Alexander Klimetschek <aklim...@adobe.com.INVALID> >> wrote: >> >> Hi everyone, >> >> the javadocs of ResourceResolver.copy/move() [1] aren't very clear whether >> these methods immediately persist the change, or if the change is transient >> and it's necessary to call commit(). >> >> The implementation of the JCR resource provider uses Session.move() which is >> transient. >> >> When copy and move works across different providers, I wonder if transient >> is still supposed to work. It seems, but would be good to clarify this. >> >> In fact, no other modifying method mentions commit(), nor does the class >> level javadoc. >> >> [1] >> https://github.com/apache/sling/blob/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L727-L781 >> [2] >> https://github.com/apache/sling/blob/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java#L554 >> >> Cheers, >> Alex > > -- Carsten Ziegeler Adobe Research Switzerland cziege...@apache.org