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

SCR: Method of resolving references limits Service ListenerHook implementations

    XMLWordPrintableJSON

Details

    Description

      When experimenting with creating a Service ListenerHook to realise a providing a service on demand pattern, I noticed that references from components managed by Felix SCR were not showing up as expected: When a reference declares a target filter, that target filter is not included in the ListenerInfo provided to the ListenerHook. As a consequence the ListenerHook is unable to create a matching service.

      Source of the observed behaviour is how SCR tracks references, specifically that it opens a ServiceListener for just the className and performs the matching of the target filter inside the ServiceListener. This approach unfortunately hides the target filter from the Service ListenerHook and thus the Service ListenerHook will have insufficient information to create a matching service.

      Also look at the discussion on the dev mailing list: https://www.mail-archive.com/dev@felix.apache.org/msg48657.html 

      Attachments

        1. FELIX-6161.patch
          14 kB
          Arnoud Glimmerveen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              arnoud Arnoud Glimmerveen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: