[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Autostarting required plugins
- From: Benjamin Schmaus <benjamin.schmaus@xxxxxxxxx>
- Date: Mon, 13 Feb 2006 15:14:02 -0500
- Delivered-to: email@example.com
- 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:references; b=LWVuUJbJgwu0HhQqXpv6pUndww94L3hwi0/iaMMKLw/ajLu4kBpRAOgGgUovFkN5mf9taoKyOmokHR9jK0v1+6S//lgJnI+pQXAO3ZLRr99NxPhYv1AEDUhzMSEWH9CfNFGhO4vbXUVGFutaAvVUBXBjoxQA1izssu7D/2P9PeI=
> The Eclipse LazyStart capabiliyt only starts bundles when they are first "accessed" (ie..,
> when someone tries to load a class from them).
Thanks for pointing that out. I just realized that "Eclipse-AutoStart" and "Eclipse-LazyStart" are actually synonyms for the same bundle manifest header and that the latter is preferred. Previously, I was under the impression that these two headers served different purposes.
I guess this would be a reasonable place and time to clarify my own thinking on bootstrapping a headless Equinox application.
Based on my current understanding of Equinox, the "org.eclipse.update.configurator" bundle can be used to automatically install bundles but some other mechanism must be used to actually start these installed bundles.
The "other mechanism" mentioned above could be, for example, a bundle that is manually installed and started via the "osgi.bundles" property used to launch the framework. This bundle could register itself as a BundleListener and automatically start other bundles upon receiving bundle RESOLVED events. Does this sound like a reasonable approach?
Are there any documented best practices/approaches for bootstrapping headless Equinox apps?
On 2/13/06, Jeff McAffer <Jeff_McAffer@xxxxxxxxxx> wrote:
Not sure that this is quite what he was looking for. The Eclipse LazyStart capabiliyt only starts bundles when they are first "accessed" (ie.., when someone tries to load a class from them). Here the bundles register services (by running code when the bundle starts) that others then discover. That is, the services need to be registered before the consumers can discover them.
The simple answer in the case of services is to look into Declarative Services. Equinox includes an implementationof this.
As for starting all prereqs, no, we do not have any explicit support for this. It would however be reasonably easy to implement. See PackageAdmin for some methods that help you traverse the dependency graph.
equinox-dev mailing list