[
https://issues.apache.org/jira/browse/SLING-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14179706#comment-14179706
]
Stefan Seifert commented on SLING-4083:
---------------------------------------
yes, indeed! - will start a thread on this
> 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)