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

Swap callback not called when there are multiple aspects on a service and one of the aspects with lower rank is removed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • org.apache.felix.dependencymanager-r8
    • None
    • Dependency Manager
    • None

    Description

      If you have multiple aspects on a service with interface X and one of the aspects with a lower rank is removed, the service requiring service X does not get the swap callback.

      See the attached Activator with example code.
      The swap method is not called when 'aspect1' is removed.
      Actual output of running the activator:

      Add: XImpl
      
      Swap old: XImpl
      Swap new: Aspect1
      
      Swap old: Aspect1
      Swap new: Aspect2
      
      Swap old: Aspect2
      Swap new: XImpl
      

      I can understand why swap is not called, because for ServiceRequiringX Aspect1 does not get really 'swapped' (the service stays Aspect2) But is there any way to find out this is happening?

      Attachments

        1. Activator2.java
          4 kB
          Pierre De Rop
        2. Activator.java
          2 kB
          Jeroen Daanen

        Activity

          People

            Unassigned Unassigned
            JeroenDaanen Jeroen Daanen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: