Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
framework-1.6.0
-
None
Description
When calling the Felix.start() method, a check is done, whether the init method must be called. After that, the state is checked again to see whether it is STARTING and hence the framework target startlevel should be set according to the org.osgi.framework.startlevel property:
final int state = getState();
if ((state == Bundle.INSTALLED) || (state == Bundle.RESOLVED))
if (state == Bundle.STARTING) {
....
Unfortunately this code is broken, since the state variable is still INSTALLED or RESOLVED after the init() method has been called even though the actual state really is STARTING.
A workaround for client code encountering this issue, is to call the init() method itself as in :
Felix felix = new Felix(map);
felix.init();
felix.start();