Re: [osgi-dev] Library development

2020-05-21 Thread Neil Bartlett via osgi-dev
Along the lines of Bernd's answer, here is what I do: 1. Use declarative services. 2. For injection of service references, prefer constructor injection. 3. The component implementation should be in a private package. However, non-OSGi consumers don't know anything about exported versus private

Re: [osgi-dev] pushstream examples?

2020-05-21 Thread Alain Picard via osgi-dev
I know that https://blog.osgi.org/2018/06/osgi-r7-highlights-push-streams-and.html has an example with the UK rail system that I reviewed a while back. HTH, Alain On Thu, May 21, 2020 at 2:54 PM Scott Lewis via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Howdy, > > Are there any public

[osgi-dev] pushstream examples?

2020-05-21 Thread Scott Lewis via osgi-dev
Howdy, Are there any public examples/samples and/or tutorials of use of the pushstream API [1]? If not, are the pushstream impl classes distributed with the API bundle(s)?   Or separately? Thanksinadvance, Scott ___ OSGi Developer Mail List

Re: [osgi-dev] Library development

2020-05-21 Thread Raymond Auge via osgi-dev
FYI, One thing few people realize is that Service Loader Mediator does allow your providers to be consumed via the service registry. If you use the bnd SPI annotations I already mentioned this is a default behavior. - Ray On Thu, May 21, 2020 at 9:19 AM Raymond Auge wrote: > Another

Re: [osgi-dev] Library development

2020-05-21 Thread Raymond Auge via osgi-dev
Another alternative designed specifically for this scenario is the OSGi Service Loader Mediator Specification [1]. Java's default _service_ mechanism is Service Loader SPI. The Service Loader Mediator Specification adds a veneer of pure metadata over this to allow it to function in OSGi. There