[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] DS in fragment bundle

It works exactly as you described. So in fact there is a way to put DS (I mean xmls and Java components implementation) in a fragment but the Service-Component manifest header must be only in a host bundle.

Thank you a lot Jeremy for your help!

Best regards,

Lukasz Bobowiec
Software Engineer, Common Agent Services
(+48 12) 628 9882

IBM SWG Lab, Cracow, Poland
IBM Polska Sp. z o.o. oddział w Krakowie
ul. Armii Krajowej 18
30 -150 Kraków

NIP: 526-030-07-24
Sąd Rejonowy dla m.st. Warszawy, XIII Wydział Gospodarczy KRS
KRS 0000012941, Kapitał zakładowy: 3.073.600 PLN

"Jeremy Volkman" <jvolkman@xxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

2008-03-17 11:52

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>
Re: [equinox-dev] DS in fragment bundle

Section 112.4.1 of the compendium spec says:

A Service-Component manifest header specified in a fragment is ignored by
SCR. However, XML documents referenced by a bundle's Service-Component
manifest header may be contained in attached fragments.

SCR must process each XML document specified in this header. If an XML
document specified by the header cannot be located in the bundle and its
attached fragments, SCR must log an error message with the Log Service, if
present, and continue.

Is this the behavior that you see?


2008/3/17 Lukasz Bobowiec <Lukasz.Bobowiec@xxxxxxxxxx>:
> Hello,
> I have one question whether OSGi fragment may expose some declarative
> services that will be attached to a host bundle?
> In the old Eclipse Equinox DS implementation I found that not. In the
> org.eclipse.equinox.ds.Activator class there is the following code:
>                 PackageAdmin packageAdmin = (PackageAdmin)
> packageAdminTracker.getService();
>                 if (packageAdmin.getBundleType(bundle) != 0) {
>                         return null; // don't process fragments.
>                 }
> What does the OSGi specification say about this behaviour? Fragments should
> not be processes?
> ---
>  Best regards,
>  Lukasz Bobowiec
>  Software Engineer, Common Agent Services
>  lukasz.bobowiec@xxxxxxxxxx
>  (+48 12) 628 9882
>  IBM SWG Lab, Cracow, Poland
>  IBM Polska Sp. z o.o. oddział w Krakowie
>  ul. Armii Krajowej 18
>  30 -150 Kraków
>  NIP: 526-030-07-24
>  Sąd Rejonowy dla m.st. Warszawy, XIII Wydział Gospodarczy KRS
>  KRS 0000012941, Kapitał zakładowy: 3.073.600 PLN
> _______________________________________________
>  equinox-dev mailing list
>  equinox-dev@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/equinox-dev
equinox-dev mailing list