The compendium services are now available as separate JARs so you can install 
one of those for the  APIs you don’t want an implementation for a specific API.

Never install the compendium JAR.

Kind regards,

        Peter Kriens



> On 9 jun. 2016, at 00:38, Cristiano Gavião <[email protected]> wrote:
> 
> Hello,
> 
> I have a bundle containing some DS components and I would like to have 
> different behaviour whether Preference Service bundle (and other compedium 
> services) is available or not.
> 
> First thing I did was to declare the import of org.osgi.service.prefs package 
> as optional in the manifest and then set the component's service reference 
> cardinality to ReferenceCardinality.OPTIONAL.
> 
> But it quickly turns out that this is not enough... I got a 
> NoClassDefFoundError as soon as I started the container.
> 
> Well, if I understood right what happened, I need to have at least a bundle 
> providing the API classes installed. right ?
> 
> So, what would be the best approach when the implementation is also packed 
> and delivered with the API in one bundle, as it is the case of Felix ones. or 
> in cases where it is not, as is the case with Equinox?
> should I pack those required packages with my own bundle also? or use the new 
> api binary bundles provided by osgi alliance?
> 
> any tip is welcome.
> 
> many thanks,
> 
> Cristiano
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to