Konrad Windszus created SLING-6375:
--------------------------------------

             Summary: Log a warning in case a resource resolver is closed by 
the Sling RR Finalizer thread
                 Key: SLING-6375
                 URL: https://issues.apache.org/jira/browse/SLING-6375
             Project: Sling
          Issue Type: Improvement
          Components: ResourceResolver
    Affects Versions: Resource Resolver 1.5.6
            Reporter: Konrad Windszus


Currently all dangling resource resolvers which are no longer referenced are 
being automatically closed by Sling in 
https://github.com/apache/sling/blob/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java#L100.
 Unfortunately this happens silently.
Since all resource resolvers should be closed explicitly in the code (and not 
rely on this thread to clean them up) there should be an according WARN in the 
log, whenever an unclosed ResourceResolver is detected and closed.

A similar logging statement can be seen in 
https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java#L1372.

Of course it would be very helpful if the stack trace where the resource 
resolver was opened would be logged as well.

See also the related discussion at 
http://www.mail-archive.com/[email protected]/msg62779.html.



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

Reply via email to