You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/10/11 16:16:42 UTC

[jira] [Commented] (SLING-3160) Creating ResourceResolverFactory as ServiceFactory leads to multiple MapEntries creation

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

Carsten Ziegeler commented on SLING-3160:
-----------------------------------------

I've applied a potential fix in rev 1531301 which splits the resource resolver factory implementation into two classes: a common singleton instance shard by all instances of the factory

> Creating ResourceResolverFactory as ServiceFactory leads to multiple MapEntries creation
> ----------------------------------------------------------------------------------------
>
>                 Key: SLING-3160
>                 URL: https://issues.apache.org/jira/browse/SLING-3160
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.1.0
>            Reporter: Chetan Mehrotra
>            Assignee: Carsten Ziegeler
>         Attachments: threaddump.txt
>
>
> With SLING-2944 ResourceResolverFactory  is now being created as ServiceFactory leading to multiple instances being created for each consuming bundle. 
> Each ResourceResolverFactoryImpl instance keeps a reference to MapEntries which internally spawns a thread to keep the entries upto date. Due to creation of multiple instances there are multiple "MapEntries Update" thread getting created which is probably not desirable.
> I think all the ResourceResolverFactoryImpl must *share* a singleton state where only single instance of MapEntries gets created



--
This message was sent by Atlassian JIRA
(v6.1#6144)