[
https://issues.apache.org/jira/browse/OAK-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13739618#comment-13739618
]
Chetan Mehrotra commented on OAK-960:
-------------------------------------
{quote}
The way it's defined in the patch ("only for reading purposes"), the
SessionOperationInterceptor interface would not allow the second goal mentioned
in the summary.
{quote}
The comments were bit misleading. By reading I meant that Interceptor should
not perform content access and instead should only access data like type of
SessionOperation e.g. Property set operation can return a toString message with
what property is being set and that information is accessible to the
interceptor.
Further to achieve the second case the interceptor would check if operation
performed is of type update then for other session operation happening in that
thread it would invoke SessionDelegate.refreshAtNextAccess. See
SessionSynchronizer.java (attached) for one such implementation
I understand that it is invoked in a critical part and has to be implemented
carefully. Once we can validate that such interceptor solves the refresh
related problem then we can refactor the code to make it more safe
> Provide an interceptor for SessionOperations
> --------------------------------------------
>
> Key: OAK-960
> URL: https://issues.apache.org/jira/browse/OAK-960
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: core, jcr
> Affects Versions: 0.8
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Attachments: OAK-960.patch
>
>
> To support certain scenarios like
> * Logging session operation being performed
> * Coordinating refresh state among multiple session used in same thread
> It would be helpful to expose a {{SessionOperationInterceptor}} which can be
> invoked by the {{SessionDelegate}} before and after the operation is
> performed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira