On 5/23/10 17:12, Morten wrote:
I am trying to see if I can get felix to work with the javax.scripting api which looks 
for scripting implementations using 
classloader.getResources("META-INF/services/javax.script.ScriptEngineFactory").

The classloader can be specified to use the classloader for my bundle and I 
have tried to require all the (jruby) scripting api bundle directly using 
Require-Bundle.

Unfortunately, even though Require-Bundle let's me access the jruby classes inside the 
jruby bundle, the getResources call won't properly lookup non-java resources such as 
files under "META-INF/services". It appears that felix Require-Bundle only work 
with java classes in packages - not files inside the imported bundle ?

If the required bundle exports META-INF/services, then it should work. However, technically, OSGi only supports exporting packages and META-INF/services is not a package so it is not supposed to work.

Any advice ?

Typically, the approach is to use the extender pattern to listen for META-INF/services and then somehow register the provider so it can be used.

-> richard

/Morten






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to