Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[osgi-users] Framework: Auto-Start of Bundles with Immediate DS Components

Hi,
I observed an issue in Equinox with Bundles not being automatically started although they do have DS components with an immediate flag in it.

From https://docs.osgi.org/specification/osgi.core/8.0.0/framework.lifecycle.html#i3270328 it is not quite clear to me under which circumstances the framework can decide to leave a bundle in RESOLVED state.

It seems to depend on its internal autostart setting, which according to chapter 4.4.5 of OSGi Core can have one of three values:
	• Stopped - The bundle should not be started.
	• Started with eager activation - The bundle must be started once it is ready and it must then be eagerly activated.
	• Started with declared activation

Under which particular circumstances is a Framework supposed to start a bundle automatically (given its autostart setting is not set to Stopped)

1. Once a class is requested from it?
2. It defines some DS components (does the immediate flag matter here)?

What I observed is that Equinox does actually auto-start the bundle once it has the Bundle Header Bundle-ActivationPolicy: lazy being set, which feels wrong to me, as that bundle header should IMHO only defer starting, but in fact without it (i.e. default eager activation) the bundle won’t be started at all.

Thanks in advance for your PoV on this matter
Konrad



Back to the top