I'm trying to use Aries SPYFly with one of our projects. According to the OSGi spec when we register an InitialContextFactory, we need to register that for both implementation and InitialContextFactory classes.
But as I experienced SPIFly only doesn't register that for particular implementation (only for the InitialContextFactory)
Did I missed anything or is this an issue?
I guess you're looking for an implementation of the OSGi JNDI Services specification (OSGi Enterprise spec  chapter 126) since that's the one that deals with the InitialContextFactory.
SPI-Fly is an implementation of a different spec, namely the OSGi ServiceLoader Mediator Specification (chapter 133), so I guess it won't help you here.
There is an implementation of the OSGi JNDI spec in Aries as well, documentation can be found at  and source code at .
Hope this helps,
On 3 October 2017 at 14:31, Thusitha Thilina Dayaratne <[hidden email]> wrote:
Thank you very much for the explanation and for the information. Just to be clear, does Aries JNDI provide support to register SPIs in OSGi environment similar to SPY-Fly? Or do I need to manually register the providers(InitialContextFactory) according to the OSGi spec?
On Tue, Oct 3, 2017 at 9:39 PM, David Bosschaert <[hidden email]> wrote:
I'm starting to understand your use case a little better now - it's been a while since I looked at JNDI, but I *think* the following could work...
* Use SPI-Fly to register the InitialContext/InitialContextFactory in the service registry from the /META-INF/services info.
* Use Aries JNDI to use that service and connect it with OSGi JNDI support.
There might be some details to work out, but that might get you what you're looking for.
On 3 October 2017 at 18:17, Thusitha Thilina Dayaratne <[hidden email]> wrote:
Thank you again for the explanation.
If I understand correctly when comes to InitialContextFactory, SPY-Fly registering mechanism will not adhere to OSGi JNDI spec, since it needs to registered for both implementation and interface. Therefore I guess I have to do some customization to SPY-Fly if the interface is an InitialContextFactory.
Am I correct?
On Tue, Oct 3, 2017 at 10:18 PM, David Bosschaert <[hidden email]> wrote:
|Free forum by Nabble||Edit this page|