Re: Automatic cleanup of lingering ResourceResolver's

2016-12-07 Thread Konrad Windszus
I created https://issues.apache.org/jira/browse/SLING-6375 for logging a WARN. > On 8 Dec 2016, at 07:59, Konrad Windszus wrote: > > You are probably right that this is not that easy to detect and basically > there are always cases which you would not be able to detect. > >

Re: Automatic cleanup of lingering ResourceResolver's

2016-12-07 Thread Konrad Windszus
You are probably right that this is not that easy to detect and basically there are always cases which you would not be able to detect. Therefore I propose to at least log a big WARN in case a resolver has been closed by the finalizer thread in

Re: Automatic cleanup of lingering ResourceResolver's

2016-12-07 Thread Julian Sedding
Hi Konrad The only way I can imagine this to be implemented is by fully(!) wrapping the JCR API and maintain a reference to originating ResourceResolver in each object (e.g. Session, Node etc). IMHO this is not worthwhile, as it opens a large can of worms. Imagine you want to cast Session to

Automatic cleanup of lingering ResourceResolver's

2016-12-06 Thread Konrad Windszus
In https://issues.apache.org/jira/browse/SLING-4372 a mechanism was invented which automatically closes all those resource resolvers which are no longer referenced. That may lead to hard to detect issues in case someone still uses a reference towards the underlying session (in case you deal