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

[jira] [Updated] (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:all-tabpanel ]

Chetan Mehrotra updated SLING-3160:
-----------------------------------

    Attachment: threaddump.txt

Thread dump where you can see 18 threads of "MapEntries Update" getting created possibly for each bundle which asks for ResourceResolverFactory

> 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
>         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)