You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2017/12/14 17:05:00 UTC

[jira] [Comment Edited] (SLING-7313) ResourceResolverImpl#refresh should also refresh the internal resourceTyperesourceResolver

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

Konrad Windszus edited comment on SLING-7313 at 12/14/17 5:04 PM:
------------------------------------------------------------------

Yes, I think refreshing should be done in https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/e10e25b882c774c6ba8491db76a2e019d239c102/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverControl.java#L153. But I am not sure how to prevent a loop in case the resourceTypeResourceResolver is also created for the ResourceResolver bound to resourceTypeResourceResolver.


was (Author: kwin):
Yes, I think refreshing should be done in https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/e10e25b882c774c6ba8491db76a2e019d239c102/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverControl.java#L153.

> ResourceResolverImpl#refresh should also refresh the internal resourceTyperesourceResolver
> ------------------------------------------------------------------------------------------
>
>                 Key: SLING-7313
>                 URL: https://issues.apache.org/jira/browse/SLING-7313
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.5.32
>            Reporter: Julian Sedding
>            Priority: Minor
>         Attachments: refresh-session.txt
>
>
> I noticed warning log messages due to long-lived Oak sessions (see attachment) and traced them back to a long-lived service {{ResourceResolver}} in the I18N code ({{JcrResourceBundleProvider}}). Care is taken to periodically refresh this {{ResourceResolver}}, however, the {{#refresh()}} call is not propagated to the internal {{resourceTypeResourceResolver}} used by {{ResourceResolverImpl}} and thus a warning is logged.
> This could be solved by using short-lived RRs in the I18N code, but I think we should also refresh the internal {{resourceTypeResourceResolver}} used by {{ResourceResolverImpl}} when RR is refreshed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)