You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2018/12/11 13:23:00 UTC

[jira] [Resolved] (CAMEL-12987) camel-core-osgi: OsgiServiceRegistry.onContextStop never gets called.

     [ https://issues.apache.org/jira/browse/CAMEL-12987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-12987.
---------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 2.23.1
                   2.24.0
                   2.22.3

Thanks for the PR

> camel-core-osgi: OsgiServiceRegistry.onContextStop never gets called.
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-12987
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12987
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-osgi
>    Affects Versions: 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.22.0, 2.23.0, 2.24.0
>         Environment: Java 10
> Karaf 4.2.1
> Camel 2.22.0
>            Reporter: Bob Paulin
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 2.22.3, 2.24.0, 2.23.1
>
>
> 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
> {code:java}
> super(registry);{code}
> this calls the DefaultCamelContext implementation of createRegistry which does not add the registry to lifecyclemanagement since
> {code:java}
> OsgiCamelContextHelper.wrapRegistry(this, registry, bundleContext);{code}
> is never called. 
> See CAMEL-12969 for screen captures.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)