karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <alexander.sah...@brodos.de>
Subject Require-Capability with effective:=active not ignored
Date Wed, 16 Aug 2017 06:43:31 GMT
Hi there.

According to http://osgi-dev.mail.osgi.narkive.com/GfJqfPGZ/require-capability-osgi-service-filter-effective-active-and-blueprint
(and the OSGi spec), a R-C header with effective:=active should be ignored by OSGi framework.
But when I create a R-C header like

Require-Capability: osgi.service;effective:=active;objectClass="javax.sql.DataSource";filter:="(osgi.jndi.service.name=bam)"

to indicate a dependency to a DataSource, the resolver tells me:

org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=isaac-app; type=karaf.feature; version="[2.1.2.SNAPSHOT,2.1.2.SNAPSHOT]";
filter:="(&(osgi.identity=isaac-app)(type=karaf.feature)(version>=2.1.2.SNAPSHOT)(version<=2.1.2.SNAPSHOT))"
[caused by: Unable to resolve isaac-app/2.1.2.SNAPSHOT: missing requirement [isaac-app/2.1.2.SNAPSHOT]
osgi.identity; osgi.identity=isaac-service; type=karaf.feature [caused by: Unable to resolve
isaac-service/2.1.2.SNAPSHOT: missing requirement [isaac-service/2.1.2.SNAPSHOT] osgi.identity;
osgi.identity=com.brodos.isaac.service; type=osgi.bundle; version="[2.1.2.SNAPSHOT,2.1.2.SNAPSHOT]";
resolution:=mandatory [caused by: Unable to resolve com.brodos.isaac.service/2.1.2.SNAPSHOT:
missing requirement [com.brodos.isaac.service/2.1.2.SNAPSHOT] osgi.service; objectClass=javax.sql.DataSource;
effective:=active; filter:="(osgi.jndi.service.name=bam)"]]]

Shouldn't it be ignored by OSGi framework?

What I try to achieve is that a certain bundle activation is postponed until a given requirement
is met. Is is possible anyways?

Best regards,
Alexander

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message