You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2018/03/08 09:16:00 UTC
[jira] [Assigned] (SLING-6932) [javadoc] Document transient nature
of ResourceResolver operations
[ https://issues.apache.org/jira/browse/SLING-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reassigned SLING-6932:
---------------------------------------
Assignee: Carsten Ziegeler
> [javadoc] Document transient nature of ResourceResolver operations
> ------------------------------------------------------------------
>
> Key: SLING-6932
> URL: https://issues.apache.org/jira/browse/SLING-6932
> Project: Sling
> Issue Type: Improvement
> Components: API
> Reporter: Alexander Klimetschek
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: API 2.16.6
>
>
> All ResourceResolver resource operations (create, delete, move, copy) are transient, one always has to call commit() to save the transaction.
> This isn't documented in the current [ResourceResolver javadoc|https://github.com/apache/sling/blob/96c4134f770c83a665170ec9fad1f8d49832e650/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java]. A general paragraph in the class level javadoc on the overall transactional behavior, plus a sentence on each modifying operation such as "It is necessary to call commit() to persist these changes." would help.
> Furthermore, with changes across multiple resource providers (such as a move), these are multiple transactions, but there is no two phase commit or the like - the first failure will stop committing transactions, and already committed transactions are not rolled back. (Based on reading [this code|https://github.com/apache/sling/blob/96c4134f770c83a665170ec9fad1f8d49832e650/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverControl.java#L419-L423]). Should be documented as well.
> Discussed here: http://sling.markmail.org/thread/vrnjgqgf3djvwscv
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)