[ 
https://issues.apache.org/jira/browse/SLING-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14189894#comment-14189894
 ] 

Stefan Seifert commented on SLING-4083:
---------------------------------------

Completed: At revision: 1635446  

reverted all changes for this ticket in trunk.

implementation is available in branch:
https://svn.apache.org/repos/asf/sling/whiteboard/sseifert/SLING-4083_models_slingobject_threadlocal

we will pick up this again if a agreement on this is achieved in the mailing 
list - otherwise we can postpone or close it, it's still possible to implement 
such a functionality in a custom injector.

> Sling Models: Enable SlingObject injector to inject all context objects when 
> a request is attached to the current thread
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-4083
>                 URL: https://issues.apache.org/jira/browse/SLING-4083
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: Sling Models Implementation 1.1.0
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>              Labels: models
>             Fix For: Sling Models Impl 1.2.0
>
>
> The SlingObjectInjector should support injecting all context objects 
> (Resource, ResourceResolver, Request, Response, SlingScriptHelper) always, 
> and not only when derivable from the current adaptable.
> in sling models 1.1.0 the injection of most of those objects fails e.g. when 
> adapting from a resource resolver because the request object is not 
> available. thus if a developer uses a @SlingObject annotation he has to be 
> aware of those implementation details when the context objects are available 
> and when not. if used from a scripting language light Sightly which first 
> tries to adapt a model from the current resource, and after that from the 
> current request things get worse.
> if a model is adapted in a thread initiated from a request all injections 
> should be always supported.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to