Maik Fuchs - 2005-09-23

Hello,

while I've made some benchmark measures with KF, I found out that KF doesn't use the startlevel service when shutting down the framework. Some bundles with a lower startlevel were stopped earlier than others with a higher startevel.

See chapter 6.2.4 of the OSGi spec: "When the Framework shuts down, the requested start level must be set to zero. The Framework must then follow the process described in Changing the Active Start Level on page 139 to make the active start level equal to zero."

After looking in the source code of KF the following problem was encountered:
The Framework.shutdown()-method uses a list(returned by the BundleStorage.getStartOnLaunchBundles()-method) that is sorted in increasing bundle id order and then it stops the bundles beginning from the highest bundle id.
So the startlevels of these bundles doen't influence the shutdown-behavior of the bundles.

Maybe someone else already noticed that!?