You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "John Poth (JIRA)" <ji...@apache.org> on 2017/01/05 14:41:58 UTC

[jira] [Commented] (CAMEL-10641) camel-core - In OSGi should unload the loaded type converters when bundle is removed

    [ https://issues.apache.org/jira/browse/CAMEL-10641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801517#comment-15801517 ] 

John Poth commented on CAMEL-10641:
-----------------------------------

Hi guys,

The example above embeds both a Camel route and a Camel TpyeConverter. If you separate them in two different bundles it should work. In our scenario, there's a timing issue where type converters are first [loaded|https://github.com/apache/camel/blob/c653828bae3b934fd03d16186a4251554d9b4a80/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiTypeConverter.java#L195] and only later on is our Converter [detected|https://github.com/apache/camel/blob/c653828bae3b934fd03d16186a4251554d9b4a80/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiTypeConverter.java#L68] without reloading the Converter registry.

Hope this helps,

John.

> camel-core - In OSGi should unload the loaded type converters when bundle is removed
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10641
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10641
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, osgi
>            Reporter: Claus Ibsen
>             Fix For: 2.19.0
>
>         Attachments: converter-example.zip
>
>
> See nabble
> http://camel.465427.n5.nabble.com/camel-core-not-detecting-converters-on-bundle-restart-in-karaf4-tp5791503.html
> So even if the CamelContext instance itself is shutdown, then somehow type converters that are static method calls somehow are causing issues. We should instead attempt to unload the type converters when stopping.
> However we need to ensure that this is called after CamelContext is stopped because the type converters are still to be used during shutdown of Camel itself.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)