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

Carsten Ziegeler commented on SLING-5561:
-----------------------------------------

I've committed a first potential solution:
- if a provider is unregistered, the pid is passed into the check conditions 
object and that handler is ignored for checking, therefore if it is requird, 
the factory will be unregistered. The provider is removed from the resource 
tree after this
- if a provider is registered, the factory is checked to be registered after 
that

> Resource Resolver Factory should be deactivated before provider is removed
> --------------------------------------------------------------------------
>
>                 Key: SLING-5561
>                 URL: https://issues.apache.org/jira/browse/SLING-5561
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.2.0, Resource Resolver 1.2.2, 
> Resource Resolver 1.2.4, Resource Resolver 1.2.6, Resource Resolver 1.4.0, 
> Resource Resolver 1.4.2, Resource Resolver 1.4.4
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Resource Resolver 1.5.0
>
>
> When a required resource provider is unregistered, this provider is first 
> removed from the set of providers, and then the resource resolver factory is 
> unregistered. During this process of unregistering, components might still 
> try to use the resource resolver factory (which is valid) and according to 
> the OSGi service model, the service should be still usable.
> However, as the required provider has already been removed, the service is 
> not usable anymore - which in turn might result in strange problems in 
> services.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to