[ 
https://issues.apache.org/jira/browse/OAK-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745920#comment-13745920
 ] 

Michael Dürig commented on OAK-960:
-----------------------------------

OTOH why couldn't we just use a thread local in Oak to track this. Something 
along the lines of 
https://github.com/mduerig/jackrabbit-oak/commit/1ec61c778396b99adfacca66454ed79e2c215c03?
 This approach covers all cases where the repository is accessed though 
multiple sessions from within the same thread, not only HTTP requests. 

Note that instead of using a static field in {{SessionDelegate}} the tread 
local could also move to a regular instance variable in {{RepositoryImpl}}. 

I understand that there is also the logging use case for the interceptor. 
However, I'd rather separate those two concerns and provide some means 
specifically targeted to logging. 


                
> 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, SessionSynchronizer.java
>
>
> 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

Reply via email to