You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@gmail.com> on 2008/03/14 10:59:36 UTC
Re: [PROPOSAL] ResourceResolverProvider interface
Hi all,
I finally created SLING-333 to keep track of Betrand's proposal as a
future enhancement.
Regards
Felix
Am Montag, den 18.02.2008, 10:42 +0100 schrieb Bertrand Delacretaz:
> On Feb 18, 2008 10:20 AM, Felix Meschberger <fm...@gmail.com> wrote:
>
> > Am Montag, den 18.02.2008, 09:54 +0100 schrieb Bertrand Delacretaz:
> >
> > >... Could this cleanup phase be integrated in the Sling core, for example
> > > at the end of request processing in the SlingMainServlet?...
> > >
> > ...I think this is self-explanatory: If we say, the one causing the
> > ResourceResolver to be created, must also release it....
>
> I'm talking about *automatic* cleanup of such objects at the end of a
> request, scenario:
>
> 1. Object A calls a method M of class C, that creates something that
> must be cleaned up (ThreadLocal variable for example)
>
> 2. Before returning, Method M registers itself to be called for
> cleanup at the end of request processing
>
> 3. Object A doesn't have to care about cleanup, it will happen automatically.
>
> This is much more foolproof than requiring A to call cleanup
> explicitely, hence my suggestion to implement a general (request-scope
> for now) cleanup mechanism.
>
> -Bertrand