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

Aggregate Dependency with Field Injection does not respect SERVICE_RANKING

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ipojo-runtime-1.12.1
    • None
    • iPOJO
    • None
    • I found this using Apache Karaf 3.0.3

    Description

      I found an issue with the Aggregate Dependency with Field Injection where i have a list of "services" that i would like to maintain with a manager. The order of the services is important.

      I noticed that the field injection, say:
      @Component
      public class HelloConsumer {
      @Requires
      private Hello m_hellos[]; // Array => Aggregate
      public doSomething() {
      for(int I = 0; I < m_hellos.length; i++)

      { System.out.println(m_hellos[i].getMessage()); }

      }
      }

      The initial list when the instance is "created" appears to respect the SERVICE_RANKING, but subequent modifications (say you install a new bundle with an additional "hello") does not respect the SERVICE_RANKING in the order. I will have to end up do my own sorting on the list prior to using the field.

      Is this normal? I feel that the SERVICE_RANKING should always be respected on the list of m_hellos[]s....

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            andyphillips404 Andy Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment