You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2016/12/08 07:05:58 UTC

[jira] [Created] (SLING-6375) Log a warning in case a resource resolver is closed by the Sling RR Finalizer thread

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/dev@sling.apache.org/msg62779.html.



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