[
https://issues.apache.org/jira/browse/OAK-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13725121#comment-13725121
]
Michael Dürig commented on OAK-803:
-----------------------------------
To warp up, the current refresh behaviour of sessions is as follows:
* Sessions automatically refresh to the latest state after being idle for more
than one second. This default can be changed by specifying another default
refresh interval on the command line using {{-Ddefault-refresh-interval=N}}.
Where {{N}} is the number of seconds. Use {{0}} to have a session to be always
on the latest state.
* The default refresh interval can be overridden on a per session basis by
passing in a {{oak.refresh-interval}} attribute with its value specifying the
refresh interval in seconds at login calling
{{JackrabbitRepository.login(Credentials credentials, String workspaceName,
Map<String, Object> attributes)}} (see JCR-3634). Alternatively the attribute
can also be passed in by attaching it to either {{SimpleCredentials}} or
{{TokenCredentials}}. The latter method is discouraged however and we might
remove it again later.
* Sessions automatically refresh before delivery of observation events
associated with that session. That is, if the session has been used to register
event listeners. This refresh happens regardless of the refresh interval from
above.
> 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