This is expected behavior. DS must ignore a Service-Component header in a 
fragment, but must process any component description XML named by the 
host's Service-Component header even if those XML files come from 
fragments.

-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargr...@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788





From:   Carl Hall <c...@hallwaytech.com>
To:     osgi-dev@mail.osgi.org, 
Date:   2012/01/23 11:01
Subject:        [osgi-dev] Services from a Fragment Bundle
Sent by:        osgi-dev-boun...@mail.osgi.org



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