[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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.

Tom



Inactive hide details for Amol Mathur ---05/30/2008 03:04:40 PM---Hi all, I had a doubt about bundle activation. I have been reAmol 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


From:

Amol Mathur <techi_amol@xxxxxxxxx>

To:

equinox-dev@xxxxxxxxxxx

Date:

05/30/2008 03:04 PM

Subject:

[equinox-dev] Bundle Activation




Hi all,

I had a doubt about bundle activation. I have been reading the sections about lazy activation policy in osgi spec and i am a little confused.

1) What is the difference between Bundle Activation and calling BundleActivator.start() method.
2) Does bundle activation mean loading of all classes that are there in the bundle?
3) I was assuming that is BundleActivation policy is not set to lazy the, on deployment the BundleActivator.start() method will be called automatically by the framework, but it doesnt happen that way.

Sorry if you feel its a dumb question but i have managed to confuse my self royally.
Thanks in advance.

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image

GIF image