We are currently discussing at karaf how to treat Require-Capability headers 
for services like this one:
osgi.service; effective:=active; filter:="(objectClass=my.Interface)"

These headers are automaatically created by bnd when it scans blueprint 
contexts or DS configs.

So while these headers are created for bundles using services they are not 
always created as capabilities for bundles that provide the services.
Karaf 4 currently checks these headers in a strict way when it installs 
features. This leads to deployment failures when no bundle is found that 
announces that it provides the service.

You could say this is only a transitionary period till all bundles providing 
services announce this. There are cases though where it would be difficult to 
create the capability headers.
For example aries jpa container creates EntityManagerFactory services for 
persistence unit bundles it encounters. So it is not known at compile time that 
this service will be created.

So my questions are:
How should these Require-Capbility headers to be treated? Should they be 
followed strictly or are they more of a recommendation?
Does effective:=active mean that the bundle should be resolved but not started 
until the capability is present or should it even fail to be installed or 
resolved?
If these headers are to be followed stictly then the question is does bnd 
behave correctly by adding them or should it rather omit them?

Many thanks in advance for your feedback

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to