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

camel-core-osgi: OsgiServiceRegistry.onContextStop never gets called.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.24.0
    • 2.22.3, 2.23.1, 2.24.0
    • camel-osgi
    • None
    • Java 10

      Karaf 4.2.1

      Camel 2.22.0

    • Patch Available
    • Unknown
    • Patch

    Description

      There is also a second problem with how the registry is being managed within the OsgiDefaultCamelContext.  OsgiServiceRegistry is currently extends LifecycleStrategySupport which is suppose to unload the serviceReferenceQueue onContextStop.  However the registry is never getting added to the CamelContext to manage the Lifecycle because the overridden createRegistry method in OsgiDefaultCamelContext is not being called.  This is because the registry is being set in the constructor of OsgiDefaultCamelContext with

      super(registry);

      this calls the DefaultCamelContext implementation of createRegistry which does not add the registry to lifecyclemanagement since

      OsgiCamelContextHelper.wrapRegistry(this, registry, bundleContext);

      is never called. 

      See CAMEL-12969 for screen captures.

       

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              bobpaulin Bob Paulin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: