[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Autostarting required plugins


Could you please elaborate on Declarative services a bit futher as to their usage scenario. Presently, my bundles expose some packages and register a lot of services. The system fails when I am just trying to use the services without actually creating any instances of the Objects exposed by the bundle (since in this case, it is not really accessed).

I also looked into the PackageAdmin service, but I couldn't find a method to get the required bundles for the current bundle. Would I need to adopt some roundabout method. If yes, then could you please throw some more light on this

I also tried the method proposed by Benjamin of using a BundleListener, but that didn't work either.

Jeff McAffer 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.


*Benjamin Schmaus <benjamin.schmaus@xxxxxxxxx>*
Sent by: equinox-dev-bounces@xxxxxxxxxxx

02/13/2006 10:22 AM
Please respond to
Equinox development mailing list

To Equinox development mailing list <equinox-dev@xxxxxxxxxxx> cc Subject Re: [equinox-dev] Autostarting required plugins

Take a look at:
Pay particular attention to the section titled "Configurations and all that...".
You can use the "org.eclipse.core.runtime" and "org.eclipse.update.configurator" bundles along with the "Eclipse-AutoStart" manifest header to automatically install and start your bundles.
See more on Eclipse-specific bundle manifest headers at _http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html _ <http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html> or look at the help contents of your Eclipse install.
- Ben

On 2/13/06, *Abhishek Verma* <_abhishekv@xxxxxxxxxxxxxxxxx <mailto:abhishekv@xxxxxxxxxxxxxxxx>> wrote:
How do I autostart the plugins on which my plugin depends. Here is the

Plugin C requires plugin A and plugin B.

Plugin C uses services registered by both the plugins. But when I try to
use the services in plugin C, I get an error. This is because plugin A
and B have not been started. I tried doing it this way and it worked.


But I am looking for a method which would autostart all my dependencies
when I start the plugin C. Any ideas how can this be done?

equinox-dev mailing list_
__equinox-dev@xxxxxxxxxxxx <mailto:equinox-dev@xxxxxxxxxxx>_
equinox-dev mailing list


equinox-dev mailing list