Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-910

Framework may ignore framework startlevel on startup

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-1.6.0
    • framework-1.6.0
    • Framework
    • 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))

      { init(); }

      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();

      Attachments

        1. FELIX-910.patch
          0.7 kB
          Felix Meschberger

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rickhall Richard S. Hall
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment