This is correct/expected behaviour.

The Service-Component header is ignored if it appears in the manifest
of a fragment, however the XML descriptor can appear in a fragment if
it is referenced from the Service-Component header in the manifest of
its host bundle.

See section 112.4.1 of the compendium spec.

Rgds,
Neil

On Mon, Jan 23, 2012 at 3:52 PM, Carl Hall <c...@hallwaytech.com> wrote:
> I have an interesting scenario that I would love some clarity on. I see
> components avaiilable from a fragment bundle and I'm wondering if
> declarative services is to blame/reward.
>
> A third party library I use has the following setup: a host bundle with
> core-serviceComponents.xml and a fragment bundle with serviceComponents.xml.
> The fragment bundle has no Service-Component manifest entry while the host
> bundle defines the following entry:
>
> Service-Component: OSGI-INF/core-serviceComponents.xml,OSGI-INF/serviceComponents.xml
>
> When the host and fragment bundles are loaded into Felix, I am able to get a
> reference to services defined in the fragment bundle. Since the spec says
> that services can't be registered from a fragment bundle since a fragment
> bundle has no activation lifecycle, am I seeing these components because
> declarative services is picking up core-serviceComponents.xml (expected) and
> serviceComponents.xml (unexpected)? Is this behavior expected and/or
> defined?
>
> Thanks,
> Carl
>
>
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

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

Reply via email to