[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Setting an Equinox-based Development Environment]


Hi JC,

Although the Import-Service and Export-Service manifest headers have been deprecated in the OSGi
spec, that doesn't mean they aren't useful or shouldn't be used.  They have always been optional,
informational, and ignored by the framework at runtime.

However, we still use them on ALL of our bundles, for both development and runtime purposes.  For
example, our tooling and build system uses these headers to help manage the true dependencies
(packages and services) between bundles, ensuring a bundle lineup will result in a system that can
actually run.

At runtime, we've used some abstract bundle activator classes (distilled from a large number of
bundles) that can read these headers and simplify the logic for handling required vs. optional
services coming and going in the system.  Our typical software stack includes 85+ bundles, with ~20
services, running on an embedded device.

Assuming your bundles include the Import- and Export-Service headers, this information can be
retrieved at runtime via the BundleContext object.

IMHO, what's missing is a standardized format for specifying the services being imported or
exported; ie: whether a service will be published immediately on startup, or must be available for
import before a bundle should be started.  Or how many instances of the service will be published or
 could be used by a bundle.  Such information would be valuable for tooling and even at runtime,
regardless of what the framework does with it.

Just my 2 cents.

-Brett


Christophe Junke wrote:

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
bundle ?


Regards,

jc

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
bundle author).


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.



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

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