Are eclipse / osgi activators always called at least once before the code is available?

In Eclipse (3.3), I have a User plugin, depending on the plugin provider. The provider has an activator. In the plugin editor for the provider, he has the checkbox "Activate this plugin when one of its classes is loaded." When checking / unchecking this will change the Manifest: Eclipse-LazyStart setting to true / false.

My question is, for me, the checkbox means that the activator cannot be started if it is not installed, while the parameter means that the activator will always be launched, whether you just want to download it using eclipse or not.

  • If you have an activator, always run at least once before the downstream plugin calls the code, regardless of this flag?
  • Does this checkbox only apply to immediate or lazy startup?
+3
source share
1 answer

Eclipse-LazyStart: true ->means that the plugin will automatically start when the class in this plugin loads.
Eclipse-LazyStart: false ->means that the plugin / bundle does not start when a class is loaded in this plugin. To do this, you need an explicit call Bundle#start(), not an automatic launch from the Equinox OSGI environment.

So, this checklist applies only to this setting.
Note: OSGI4.1, which can also set a new parameter Bundle-ActivationPolicy.

From OSGI design :

Lazy activation

- , , .
, .
"" "", , .

- " ", " ".
, , (lazy-start true) (if lazy start false)

+8

Source: https://habr.com/ru/post/1714758/


All Articles