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 2019/03/12 08:08:00 UTC

[jira] [Updated] (CAMEL-13312) ModelCamelContext loadRoutesDefinition/loadRestsDefinition are misleading

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

Claus Ibsen updated CAMEL-13312:
--------------------------------
    Fix Version/s: 3.0.0

> ModelCamelContext loadRoutesDefinition/loadRestsDefinition are misleading
> -------------------------------------------------------------------------
>
>                 Key: CAMEL-13312
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13312
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 3.0.0, 3.0.0-M2
>
>
> We do have method like loadRoutesDefinition and loadRestsDefinition in the ModelCamelContext interface but they are a little bit misleading as they do not load a definition in the camel context but they are an helper that invoke
> {code}
> ModelHelper.loadRoutesDefinition(this, is)
> {code}
> The only advantage is that you do not need to pass the camel context but other that that they appear as pure utility.
> Toproperly load a route one need to do something something like
> {code}
> context.addRouteDefinitions(context.loadRoutesDefinition(is).getRoutes())
> {code}
> which is a little ugly



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