Konrad Windszus created SLING-5023:
--------------------------------------

             Summary: ResourceResolver bound in ObservationListenerSupport is 
stale after the configuration for the Resource Resolver Factory (PID: 
org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) is 
touched
                 Key: SLING-5023
                 URL: https://issues.apache.org/jira/browse/SLING-5023
             Project: Sling
          Issue Type: Bug
          Components: JCR
    Affects Versions: JCR Resource 2.5.0
            Reporter: Konrad Windszus


Currently after reconfiguring the 
org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl the 
ResourceResolverFactory service is restarted.
The restart is unfortunately not detected by either {{OakResourceListener}} nor 
{{ObservationListenerSupport}}.Therefore the resource resolver being bound in 
{{ObservationListenerSupport.resourceResolver}} is not refreshed. As a 
consequence this resource resolver is no longer being bound to any 
ResourceProviders and therefore all resolve requests on that resolver return 
{{null}}.

Possible solution: Add a service tracker for the {{ResourceResolverFactory}} in 
{{ObservationListenerSupport}}.

The result of this bug is that after the configuration for the Resource 
Resolver Factory is touched, the {{OakResourceListener}} does no longer 
propagate any event below jcr:content 
(https://github.com/apache/sling/blob/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/OakResourceListener.java#L206)
 because of the resource being {{null}} (in 
https://github.com/apache/sling/blob/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/OakResourceListener.java#L213).



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

Reply via email to