[
https://issues.apache.org/jira/browse/OAK-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13709617#comment-13709617
]
Michael Dürig commented on OAK-803:
-----------------------------------
In a discussion between [~asanso], [~jukkaz] and myself it came up that we need
some further refinements here. The current auto refresh functionality, which
only kicks in after the session has been unused for more than a second, has a
backward compatibility issue when client code expects sessions to reflect
changes immediately. We agreed that ultimately client code should be changed
since such expectations easily lead to race conditions. In the meanwhile
however Oak should:
# provide a reasonable default behaviour,
# provide a way for clients to choose the refresh behaviour on login,
# provide means for monitoring session life time in order to identify long
lived sessions.
In relation to 1. we discussed making admin sessions eagerly auto refresh on
each access, since these are probably the most common cases of background
sessions. Regarding 2. we could use attributes on {{SimpleCredentials}} to
select a specific refresh behaviour (i.e. eager, deferred, none). However this
doesn't cover the case of logins done through other means. For 3. we discussed
adding logging when an "old" session is accessed and adding JMK
instrumentations for sessions providing the session live time.
> Backwards compatibility of long-lived sessions
> ----------------------------------------------
>
> Key: OAK-803
> URL: https://issues.apache.org/jira/browse/OAK-803
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: jcr
> Reporter: Jukka Zitting
> Assignee: Michael Dürig
>
> The auto-refresh mode added in OAK-88 should perhaps be enabled by default,
> with warning logs to let clients know that relying on such a default behavior
> without explicit per-session configuration might not be supported in a future
> release.
--
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