[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Deprecated Import-Service & Export-Service

This was asked recently on the osgi-dev list. It appears that my
timezone gives me the chance to respond to this first (or maybe
everybody else is at JavaOne!), but I can't do any better than to
quote BJ Hargrave's explanation:

"With regard to the Export-Service/Import-Service manifest headers, these
header were never meaningful at runtime since a bundle does not have to
register any service during the execution of its BundleActivator. A bundle
cen register and unregister a service at any time and for any reason (as
long as it is started). So these header were of dubious value. Some people
used them as hint to the management system to say if bundle A says
Import-Service: FooService then I better install a bundle which says
Export-Service: FooService. This is only generally interesting for the
reasons described above.

I guess the prefered thing now is Declarative Services (DS). The metadata
for DS is more meaningful than the Export-Service/Import-Service manifest
headers. And SCR (the DS runtime) will process that and connect services
together. DS does require the bundles to be started, but since DS does not
require the bundles to have a BundleActivator, then cost of starting a
bundle with no BundleActivator is the same as resolving it: that is no
class loader needs to be created until SCR needs to load a class from the


On 5/16/06, Gavin Bong <gavin.emploi@xxxxxxxxx> wrote:

I'm a just a curious newbie to OSGI. While reading the R4 Core spec, items & says that the manifest headers Import-Service &
Export-Service have been deprecated. Why were they deprecated ? The equinox code
still uses both headers.



_______________________________________________ equinox-dev mailing list equinox-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/equinox-dev

Neil Bartlett
Senior Technical Consultant, Integility Ltd
Tel: +44 (0) 20 7043 8328
Fax: +44 (0) 20 7043 8329

LinkedIn Profile: https://www.linkedin.com/in/neilbartlett