|Re: [equinox-dev] Bundle Activation|
The bundle activation policy (specified by the Bundle-ActivationPolicy header) indicates to the framework how the bundle should be activated when Bundle#start(Bundle.START_ACTIVATION_POLICY) is called. When the policy is "lazy" then the BundleActivator#start(BundleContext) method is delayed until the first "trigger" class is loaded from the bundle. When no policy is specified then the default policy is "eager" which means that when Bundle#start(Bundle.START_ACTIVATION_POLICY) is called then the BundleActivator is loaded and start(BundleContext) is called immediately (as long as the bundle start-level is adequate).
In Eclipse the management agent (old update manager and p2) only calls Bundle#start(Bundle.START_ACTIVATION_POLICY) by default on bundles that have the "lazy" bundle activation policy. We have had many debates on what should happen for bundles that have no activation policy. Some folks want all these bundles to be activated "eagerly" each and every launch, others want to have the bundles be activated only if they are really needed, others want to be able to control which set of bundles are eagerly activated for their configuration.
In old Eclipse Update, none of the "eager" bundles are activated by default. You must use some other means of getting the bundles you want eagerly activated to be started. In p2 there is an option to install an IU (installable unit) that configures bundles to be eagerly started. The point is many folks will want different things when it comes to eagerly activating bundles installed into the framework. We should not bake into the install agent a policy to eagerly activate all bundles. Instead we should have an agent that is flexible and can be provisioned to do exactly what we want. This is one of the goals of p2.
Amol Mathur ---05/30/2008 03:04:40 PM---Hi all, I had a doubt about bundle activation. I have been reading the sections about lazy activatio
Amol Mathur <techi_amol@xxxxxxxxx>
05/30/2008 03:04 PM
[equinox-dev] Bundle Activation
equinox-dev mailing list