Hi Bertrand

We don't really disagree at all ;-)

In fact having written my previous messages, I wonder, whether our default 
values we provide to scripts (request, response, etc.) should not really be 
provided by a BVP in the "request" (or such) scope/context/usage ;-)

Somehow I tend to get to the term "context" for this thing.

Regards
Felix

Am 07.08.2013 um 09:34 schrieb Bertrand Delacretaz:

> On Wed, Aug 7, 2013 at 9:04 AM, Felix Meschberger <[email protected]> wrote:
>> ...But there is not currently a way that a script could declare "I am an HC 
>> script" or
>> "I am a Request Processing script"...
> 
> The missing piece here is that the HC scripts that I'm talking about
> (and probably the workflow ones that Justin mentioned) are *not* your
> usual Sling script, adapted from a Resource etc.
> 
> In the HC case the (mini-)script is just an expression that's part of
> an OSGi config (see SLING-2987 for examples), as in:
> 
>  expression = jmx.attribute('java.lang:type=ClassLoading',
> 'LoadedClassCount') > 10
> 
> so the separation between request processing scripts and HC scripts is
> obvious. They are executed in very different contexts, which warrant
> different script bindings.
> 
> In the HC case, bindings need to be provided by OSGi services so as to
> be extensible - we have an existing API to do that
> (BindingValuesProviders), the proposal is simply to allow that API to
> indicate more specifically what the bindings are meant to be used for.
> 
> Hardcoded bindings for HC are unnecessarily limitative, and inventing
> a different bindings provider API just for HC feels very wrong, so I
> have a hard time understanding the reluctance to this proposal.
> 
> -Bertrand

Reply via email to