You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Padraic Hannon <pi...@wasabicowboy.com> on 2008/01/08 21:02:46 UTC

Sling Scripting, again

I'd like to update the various ScriptEngineFactories so that they  
provide their services via osgi. This way the registration of  
factories can be done via standard osgi bundle activation. This would  
allow the default script resolver to access Freemarker and the other  
engines, and could be used for microSling as well.

WDYT?
paddy 


Re: Sling Scripting, again

Posted by Felix Meschberger <fm...@gmail.com>.
Am Dienstag, den 08.01.2008, 12:02 -0800 schrieb Padraic Hannon:
> I'd like to update the various ScriptEngineFactories so that they  
> provide their services via osgi. This way the registration of  
> factories can be done via standard osgi bundle activation. This would  
> allow the default script resolver to access Freemarker and the other  
> engines, and could be used for microSling as well.
> 
> WDYT?

The ScriptResolver is capable of getting ScriptEngineFactories from
bundles through the META-INF/services/* mechanism as well as getting
ScriptEngineFactory services. So both methods are acceptable.

If we are talking about reuse of ScriptEngineFactory implementations,
having support for the META-INF/services/* mechanism is crucial, as this
is the default mechanism to inject such a biest in a traditional
(static) application.

The other way around also works: Our implementations could theoretically
be used in traditional applications. Whether someone would be interested
in this (and not using Sling) is another question :-)

Regards
Felix


Re: Sling Scripting, again

Posted by Padraic Hannon <pi...@wasabicowboy.com>.
I guess the current bundles are accessible to the DefaultSlingScript  
resolver (assuming they are active and an entry for META-INF/services/ 
javax.script.ScriptEngineFactory), I was thinking that it might be  
nice to have their packages exported rather than remain private. I  
guess, though, then people might start using them without going  
through the script resolver...

-paddy

On Jan 8, 2008, at 12:02 PM, Padraic Hannon wrote:

> I'd like to update the various ScriptEngineFactories so that they  
> provide their services via osgi. This way the registration of  
> factories can be done via standard osgi bundle activation. This  
> would allow the default script resolver to access Freemarker and the  
> other engines, and could be used for microSling as well.
>
> WDYT?
> paddy