Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Resource Resolver 1.5.6
-
None
Description
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.
Attachments
Issue Links
- relates to
-
SLING-4372 The use of finalize in ResourceResolver leads to performance issues
- Closed