Marius Petria created SLING-4498:
------------------------------------

             Summary: Prevent resourceresolver finalizer to close when there 
are unexpected exceptions
                 Key: SLING-4498
                 URL: https://issues.apache.org/jira/browse/SLING-4498
             Project: Sling
          Issue Type: Bug
          Components: ResourceResolver
    Affects Versions: Resource Resolver 1.1.14
            Reporter: Marius Petria


SLING-4372 introduced a custom finalizer for ResourceResolvers. However in case 
of an exception like the  following, the finalizer thread will exit. The 
finalizer thread should probably catch all Throwables.

{code}
12.03.2015 13:48:58.904 *ERROR* [Apache Sling Resource Resolver Finalizer 
Thread] org.apache.sling.extensions.threaddump.internal.Activator Uncaught 
exception in Thread Thread[Apache Sling Resource Resolver Finalizer 
Thread,5,main]
java.lang.IllegalStateException: Invalid BundleContext.
        at 
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)
        at 
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:475)
        at 
org.apache.sling.jcr.resource.internal.helper.jcr.RepositoryHolder.release(RepositoryHolder.java:53)
        at 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.close(JcrResourceProvider.java:246)
        at 
org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext.close(ResourceResolverContext.java:145)
        at 
org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$ResolverWeakReference.close(CommonResourceResolverFactoryImpl.java:403)
        at 
org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$1.run(CommonResourceResolverFactoryImpl.java:94)


{code}



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

Reply via email to