Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11877

OsgiServiceRegistry might use stale Services

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: osgi
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      OsgiServiceRegistry uses raw ServiceReferences to obtain a Servie Object. Once the Object is fetched it is cached and reused. THis can lead to the state, that cmael uses outdated services (e.g. the service get updated/replaced).
      To prevent this, Camel should use ServiceTracker instead, this would make fetching services much more easier and roboust because ServiceTracker will handle all the dynamic parts and can simply be queried for a Service.

      The ServiceTraker Objects itself can then be cached and simply closed onContextStop

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              laeubi Christoph Läubrich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: