camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CAMEL-3629) Remove creating DefaultCamelContext out of the blue
Date Wed, 09 Feb 2011 09:09:57 GMT

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

Willem Jiang reassigned CAMEL-3629:
-----------------------------------

    Assignee: Willem Jiang

> 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

        

Mime
View raw message