SPIFly support for InitialContextFactory

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SPIFly support for InitialContextFactory

Thusitha Thilina Dayaratne
Hi All,

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?

Thanks
Thusitha
--
 
Reply | Threaded
Open this post in threaded view
|

Re: SPIFly support for InitialContextFactory

David Bosschaert
Hi,

I guess you're looking for an implementation of the OSGi JNDI Services specification (OSGi Enterprise spec [1] 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 [2] and source code at [3].

Hope this helps,


On 3 October 2017 at 14:31, Thusitha Thilina Dayaratne <[hidden email]> wrote:
Hi All,

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?

Thanks
Thusitha
--
 

Reply | Threaded
Open this post in threaded view
|

Re: SPIFly support for InitialContextFactory

Thusitha Thilina Dayaratne
Hi David,

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?

Regards
Thusitha

Sent with Mailtrack

On Tue, Oct 3, 2017 at 9:39 PM, David Bosschaert <[hidden email]> wrote:
Hi,

I guess you're looking for an implementation of the OSGi JNDI Services specification (OSGi Enterprise spec [1] 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 [2] and source code at [3].

Hope this helps,


On 3 October 2017 at 14:31, Thusitha Thilina Dayaratne <[hidden email]> wrote:
<img width="0" height="0" class="m_-4626058766803783287gmail-m_1482542098927748732mailtrack-img" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">Hi All,

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?

Thanks
Thusitha
--
 




--
 
Reply | Threaded
Open this post in threaded view
|

Re: SPIFly support for InitialContextFactory

David Bosschaert
Hi Thusitha,

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.

Best regards,

David

On 3 October 2017 at 18:17, Thusitha Thilina Dayaratne <[hidden email]> wrote:
Hi David,

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?

Regards
Thusitha

Sent with Mailtrack

On Tue, Oct 3, 2017 at 9:39 PM, David Bosschaert <[hidden email]> wrote:
Hi,

I guess you're looking for an implementation of the OSGi JNDI Services specification (OSGi Enterprise spec [1] 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 [2] and source code at [3].

Hope this helps,


On 3 October 2017 at 14:31, Thusitha Thilina Dayaratne <[hidden email]> wrote:
Hi All,

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?

Thanks
Thusitha
--
 




--
 

Reply | Threaded
Open this post in threaded view
|

Re: SPIFly support for InitialContextFactory

Thusitha Thilina Dayaratne
Hi David,

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?

Thanks
Thusitha




Sent with Mailtrack

On Tue, Oct 3, 2017 at 10:18 PM, David Bosschaert <[hidden email]> wrote:
Hi Thusitha,

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.

Best regards,

David

On 3 October 2017 at 18:17, Thusitha Thilina Dayaratne <[hidden email]> wrote:
<img width="0" height="0" class="m_3638802091063022867m_7817004527249959190mailtrack-img" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">Hi David,

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?

Regards
Thusitha

Sent with Mailtrack

On Tue, Oct 3, 2017 at 9:39 PM, David Bosschaert <[hidden email]> wrote:
Hi,

I guess you're looking for an implementation of the OSGi JNDI Services specification (OSGi Enterprise spec [1] 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 [2] and source code at [3].

Hope this helps,


On 3 October 2017 at 14:31, Thusitha Thilina Dayaratne <[hidden email]> wrote:
<img width="0" height="0" class="m_3638802091063022867m_7817004527249959190m_-4626058766803783287gmail-m_1482542098927748732mailtrack-img" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">Hi All,

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?

Thanks
Thusitha
--
 




--
 




--