[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Setting an Equinox-based Development Environment
- From: "Christophe Junke" <junke.christophe@xxxxxxxxx>
- Date: Fri, 6 Oct 2006 15:11:48 +0200
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YhgmbztT/p9EEaK4Z8MBdwzz1WLLm2dvyMcjZuvzCfWINAZmGxdLhHVQQO9UXVMid7wswdhIkWhLUhFicIz+JnBG5mAd/HSBNotgFGHadJaMUimHp97wvzNh1jOpTcfnd4n/8MUR5Zd1a7yr/K9vvlKSwUbWCMgIfuHc983I3o4=
Bundles can register and unregister services at any time using OSGi runtime
functionnalities, and use service trackers to get service
implementations. But doing so,
we hide the bundle dependencies inside the code. If I give a Jar file
(a bundle) to my OSGi framework, how can it discover what services are
necessary to make the bundle
work ? Package or even Bundle dependencies are not sufficent.
Declarative Service was introduced to be more powerful than
Using the Declarative Service, one should be able to inspect the
read the "serviceComponent" field, retrieve the xml component
description files, and finally
parse the xml files to know what services are associated with the bundle.
However, OSGi Declarative Service does not provide a public interface
to discover what
are the informations declared by a component. The only way to know what services
are available/required is to start a bundle and ask the framework for
the currently registered
services, which is not what I want. I consider that a component's
declaration contains static informations; these informations should be
visible from the framework whatever the bundle state is; and because
the informations are declared in an XML format, is is easy
for both human and machines to know what are the services that take
part to one bundle's
Is there any way of getting the component declarations from Equinox framework,
or are they only handled on the private side of the software, when
starting and stopping a
2006/10/6, Niclas Hedhman <niclas@xxxxxxxxxxx>:
On Friday 06 October 2006 18:22, Piero Campanelli wrote:
> Question: is there a way to inspect what services does a bundle provide?
> (Ex. bundle xxx exports serviceA, serviceB, serviceC).
Export and Import of services was deprecated some time ago, and is no longer
recommended. So, which services are registered(!) and consumed can only be
obtained in runtime, and may in fact not be very static at all (up to the
Equinox provide that via the console interface. IIRC, "bundle <bundle-id>"
will list not only the services provided and consumed by the bundle, but also
the wiring information of packages.
equinox-dev mailing list