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 (JIRA)" <ji...@apache.org> on 2008/03/14 10:59:24 UTC

[jira] Created: (SLING-333) Implement object cleanup mechanism

Implement object cleanup mechanism
----------------------------------

                 Key: SLING-333
                 URL: https://issues.apache.org/jira/browse/SLING-333
             Project: Sling
          Issue Type: New Feature
            Reporter: Felix Meschberger


In a message on the dev list  [1] Bertrand stipulated a cleanup feature along these lines:

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. 


[1] http://markmail.org/message/eeilivxyrm7s5z42

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-333) Implement object cleanup mechanism

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-333:
-----------------------------------

    Component/s: Core

I'm not sure if we should do something like this - the Spring project provides a request listener (perhaps there is a filter as well) which allows to do this kind of stuff, so we should rather reuse this.


> Implement object cleanup mechanism
> ----------------------------------
>
>                 Key: SLING-333
>                 URL: https://issues.apache.org/jira/browse/SLING-333
>             Project: Sling
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Felix Meschberger
>
> In a message on the dev list  [1] Bertrand stipulated a cleanup feature along these lines:
> 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. 
> [1] http://markmail.org/message/eeilivxyrm7s5z42

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.