Hi guys, is this the wrong list for such question? Can you point me to a more suitable one?
Best regards, Markus Am Fr., 18. Okt. 2019 um 10:55 Uhr schrieb Markus Rathgeb <maggu2...@gmail.com>: > > Hello, > > I have question about the serviceloader specific manifest entries (WRT > to the example from > https://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html): > > The bundle that provides an implementation by SPI should contain that > manifest headers: > > Require-Capability: > osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)" > Provide-Capability: osgi.serviceloader;osgi.serviceloader=foo.bar.MySPI > > Let's name it bundle_provider for the moment. > > If my reading has been correct the ServiceLoader Registrar (e.g. > SPI-fly) register the specific implementation class OSGi Services so > that OSGi-aware consumers can simply use them from the OSGi Service > Registry. > > If "@Reference foo.bar.MySPI" is used in a component (so a consumer) > the bnd tooling will generate that manifest header: > > Require-Capability: > osgi.service;filter:="(objectClass=foo.bar.MySPI)";effective:=active > > Wouldn't it make sense if bundle_provider also contains the header: > > Provide-Capability: osgi.service;objectClass:List<String>="foo.bar.MySPI" > > As bundle_provider requires the ServiceLoader Registrar can't it state > that the OSGi service is provided? > > Or should the requirement > osgi.service;filter:="(objectClass=foo.bar.MySPI)";effective:=active > also be satisfied by the provided > osgi.serviceloader;osgi.serviceloader=foo.bar.MySPI > (and its requirement for the Registrar) by the resolving implementations? > > Best regards, > Markus _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev