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

Carsten Ziegeler commented on SLING-12019:
------------------------------------------

All registration and unregistration operations in 
ResourceResolverFactoryActivator need to be queued to avoid any race condition. 
We used to have large synchronized blocks around those to achieve this, however 
that lead to deadlocks as the service registry is called from a synchronized 
blocks. We then reduced the synchronized blocks to a minimum, which now can 
lead to the mentioned scenario.

> Avoid duplicate ResourceResolverFactory registrations
> -----------------------------------------------------
>
>                 Key: SLING-12019
>                 URL: https://issues.apache.org/jira/browse/SLING-12019
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.10.0
>            Reporter: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Resource Resolver 1.10.2
>
>
> It seems that in some situations a new resource resolver factory is 
> registered without unregistering the old one - which leads to two factories 
> being registered. As not all components do eager service binding, these 
> components stick to the old factory - and the old factory in turn is 
> basically "empty" meaning all resource providers are unregistered. This 
> prevents those components from reaching any resource, although everything 
> looks fine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to