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

Willem Jiang resolved CAMEL-3629.
---------------------------------

    Resolution: Fixed

> Remove creating DefaultCamelContext out of the blue
> ---------------------------------------------------
>
>                 Key: CAMEL-3629
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3629
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cxf
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 2.7.0
>
>
> In CamelConduit the follow code just creates a new camel context on-demand. 
> This is plain wrong. Any components shouldn't just go around creating new 
> camel contexts. Instead the component should fail if a CamelContext hasn't 
> been injected.
> {code}
>     public CamelContext getCamelContext() {
>         if (camelContext == null) {
>             getLogger().log(Level.INFO, "No CamelContext injected, create a 
> default one");
>             camelContext = new DefaultCamelContext();
>         }
>         return camelContext;
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to