Ray
Ray

Reputation: 1334

Changing the start level state of the OSGi runtime

OSGi bundle start levels can be defined per bundle during runtime per the BundleStartLevel API.

The OSGi framework offers an initial start level "org.osgi.framework.startlevel.beginning", which the framework takes the runtime to at startup.

What I would like to know is if there is a way during runtime to change the current start level of the framework such that on change, all bundles that are no longer meeting the start level would be shut off in the proper order.. or vice versa, any bundles that are not currently running would then be started up to the new start level, akin to unix run levels.

Upvotes: 2

Views: 485

Answers (1)

palacsint
palacsint

Reputation: 28865

You can use the old (now deprecated) StartLevel.setStartLevel or the new FrameworkStartLevel.setStartLevel methods.

Upvotes: 3

Related Questions