[ 
https://issues.apache.org/jira/browse/SLING-12376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler reassigned SLING-12376:
----------------------------------------

    Assignee: Carsten Ziegeler

> Use per thread resource resolver for disposable callbacks
> ---------------------------------------------------------
>
>                 Key: SLING-12376
>                 URL: https://issues.apache.org/jira/browse/SLING-12376
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: Models Implementation 1.7.2
>
>
> For clean up (disposal) the model adapter factory uses two approaches - if 
> the adaptable is an external (Sling) request, it stores the disposables as a 
> request attribute - and the clean up happens at the end of the request via a 
> listener.
> For anything else, a phantom reference is added to a queue and that queue is 
> clean up periodically (by default all 5 minutes).
> I think we can combine both into a single much cleaner approach: attach the 
> disposables as closeable properties to the current resource resolver - the 
> clean up then happens when the resource resolver is closed (usually at the 
> end of the request).
> With that we can combine both cases into a single one and remove all the 
> special handling, queueing, listeners.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to