[
https://issues.apache.org/jira/browse/SLING-2227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108718#comment-13108718
]
Justin Edelson commented on SLING-2227:
---------------------------------------
Two minor comments:
* method should be isSessionSaveRequired, not isSessionUpdateRequired
* AFAIK, it's better (definitely more terse) to use Boolean.parseBoolean() than
return request.getAttribute(SKIP_SESSION_HANDLING) != null &&
Boolean.TRUE.equals(request.getAttribute(SKIP_SESSION_HANDLING));
otherwise, LGTM
> Add configuration to skip session.save in AbstractPostOperation
> ---------------------------------------------------------------
>
> Key: SLING-2227
> URL: https://issues.apache.org/jira/browse/SLING-2227
> Project: Sling
> Issue Type: Improvement
> Components: Servlets
> Reporter: Markus Joschko
> Attachments: session_skip.diff
>
>
> With SLING-1725 the postservlet operations have been exposed as services to
> be consumed by other servlets.
> I use that to create two nodes with the ModifyOperation in one request.
> However the second node creation might fail because of the postprocessors.
> In that case I want to return an error to the user and have nothing stored.
> This can't be done at the moment as the AbstractPostOperation always saves
> independently from its context (so first node gets saved, second node not).
> I think it makes a lot of sense to let the caller of the operation have
> control over when the session is saved and introduced a flag to skip the save
> when requested.
> It is modeled after the isSkipCheckin flag.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira