[ https://issues.apache.org/jira/browse/SLING-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert resolved SLING-4083. ----------------------------------- Resolution: Fixed Completed: At revision: 1633413 fix invalid dependency scope. i tried to add an integration test for this as well, but this fails because the integration tests does not seem to run in a request context, but in some separate thread i suppose (have never looked into the IT infrastructure implementation). > 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)