Skip to main content

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


Ben,

Yes, sorry about the confusing names.  The old name (AutoStart) was just too misleading so we had to rename it.  Eventually it will fall out of common parlance and we'll all breath a sigh of relief.

Your summary of the situation is quite accurate.  One thing that I will point out however is that this is really an OSGi thing not an Eclipse/Equinox thing.  OSGi explicitly stays out of defining how/when bundles are started.  This is great from a spec point of view as it is much more flexible.  Its a bit of a bummer from a consumer point of view since each framework implmentation does things differently.  Some frameworks, for example, have been known to aggressively start all bundles when they are installed.  Other folks have implemented something like you suggest and have someone that starts bundles for them according to whatever policy they want.

We have talked about a couple ideas that might help with using update manager and getting bundles started at install time but are focused on M5 right now and have not implemented anything.

Jeff




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

02/13/2006 03:14 PM

Please respond to
Equinox development mailing list

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





> 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?
 
Thanks,
Ben
 
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.


Jeff



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






Abhishek,
 
Take a look at:
 

http://www.eclipse.org/equinox/quickstart.html
 
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  or look at the help contents of your Eclipse install.
 
- Ben

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

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.

osgi.bundleclipse.product=A.pro
es=A,B@2:start,C@2:start,org.eclipse.core.runtime@2:start
osgi.bundles.defaultStartLevel=4

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?

Thanks
Abhishek
_______________________________________________
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


_______________________________________________
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


Back to the top