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 2022/09/02 09:02:00 UTC

[jira] [Resolved] (CAMEL-8638) Enforce immutability of camel context properties

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

Claus Ibsen resolved CAMEL-8638.
--------------------------------
    Resolution: Won't Fix

> Enforce immutability of camel context properties 
> -------------------------------------------------
>
>                 Key: CAMEL-8638
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8638
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Thomas Diesler
>            Priority: Major
>
> There are properties on CamelContext that should be immutable after context start.
> For example the application classloader associated with a CamelContext is not a dynamic thing. You are supposed to
> 1. Create the CamelContext 
> 2. Configure it (i.e. setApplicationContextClassLoader, etc)
> 3. Start the CamelContext
> Reconfiguring the CamelContext at runtime would lead to undefined behaviour. If a higher level supports dynamicity in that classloader, it should set the application classloader to something that supports that.
> Dynamicity in classloading is generally problematic because Java does not have a notion of "unload class", which would apply to the remove and replace cases.
> For example:
> * CL loads type A1 - CL gets reconfigured so that A1 is no longer available - loading of A1 is now inconsistent
> * CL loads type A1 - CL gets reconfigured so that A1 is something else - loading of A1 is again inconsistent



--
This message was sent by Atlassian Jira
(v8.20.10#820010)