Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Activation of optionally required bundles
Activation of optionally required bundles [message #35079] Wed, 11 February 2004 12:04 Go to next message
Eclipse UserFriend
Originally posted by: igorf.ca.ibm.com

I have bundle A which optionally requires bundle B. Bundle B is not
available at Eclipse startup but installed using
BundleContext#install(String) before bundle A is activated. I have
expected that when bundle A is activated, bundle B will be activated as
well and packages provided by bundle B will be visible to A. However,
this is not happening and I have to force activation of bundle B before
bundle A gets activated. The problem is, activation of bundle B is very
expensive so I would like to avoid it until it is absolutely necessary.
Any advice?

Regards,
Igor
Re: Activation of optionally required bundles [message #35113 is a reply to message #35079] Thu, 12 February 2004 01:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pascal_rapicault.yahoo.fr

In OSGi, in order to minimize the perturbation of the running system,
installing simply means declaring the bundle to the framework.
Therefore, in order to be considered during classload, installed bundles
must be refreshed (or started which includes an implicit refresh) which may
be a costly operation requiring shutdown and restart of bundles, etc...

So in your case, once B is installed do a refresh on it (there is a code
snipped doing that in org.eclipse.update.configurator) and A should then see
it. Then, let the automatic activation do the rest for you.

PaScaL

"Igor Fedorenko" <igorf@ca.ibm.com> a
Re: Activation of optionally required bundles [message #35136 is a reply to message #35113] Thu, 12 February 2004 02:22 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_mcaffer_REMOVE.ca.ibm.com

Also, you should really be careful with how much work you do in the startup
code for a plugin. There are many reasons for a plugin to be activated.
For example, if I have a class whose signature references one of yours, it
is very likely that your class will be loaded when mine is verified. I may
actually have no interest in invoking your function but because one of your
classes is loaded, you will be activated. If you do alot of work in
start/startup(), it may well be wasted.

In general anything that you need to do should be done even more lazily.
That is, when the model, data, service, ... (whatever it is you are
initializing) is actually needed.

Jeff

"Pascal Rapicault" <pascal_rapicault@yahoo.fr> wrote in message
news:c0ej5m$26p$1@eclipse.org...
> In OSGi, in order to minimize the perturbation of the running system,
> installing simply means declaring the bundle to the framework.
> Therefore, in order to be considered during classload, installed bundles
> must be refreshed (or started which includes an implicit refresh) which
may
> be a costly operation requiring shutdown and restart of bundles, etc...
>
> So in your case, once B is installed do a refresh on it (there is a code
> snipped doing that in org.eclipse.update.configurator) and A should then
see
> it. Then, let the automatic activation do the rest for you.
>
> PaScaL
>
> "Igor Fedorenko" <igorf@ca.ibm.com> a
Previous Topic:How to provide all packages
Next Topic:Is start level working?
Goto Forum:
  


Current Time: Sun Jun 30 13:19:51 GMT 2024

Powered by FUDForum. Page generated in 0.04084 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top