Jacques-Olivier Goussard wrote:
Hi
I'm trying to deploy a JNDI provider in OSGi and I'm kinda stuck on the
'jndi.properties'
discovery mechanism. This file is supposed to be in the default package (the
root of the
classloader).
How can a bundle export a resource from this package ?
Export-Package: . ??
Exporting from an explicit package is easy, but this one doesn't seem
covered by the spec.
It is not covered because it is not possible to do. Exporting the
default package has no real meaning since every bundle can contain the
default package. There is no way to verify you are importing the correct
default package you actually need.
Perhaps others can suggest some workarounds.
-> richard
Of course, using the preferred way of accessing an InitialContext, i.e
Context ic = new InitialContext(env);
does work as I can configure the InitialContextFactory explicitely, but I'd
like to support
the more sloppy new InitialContext() approach too.
Any ideas ?
/jog
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]