You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jay mann (JIRA)" <ji...@apache.org> on 2016/06/09 13:04:21 UTC
[jira] [Created] (CAMEL-10036) Dynamicaly Loaded XML Rests Bind to
all RestConfigurations
Jay mann created CAMEL-10036:
--------------------------------
Summary: Dynamicaly Loaded XML Rests Bind to all RestConfigurations
Key: CAMEL-10036
URL: https://issues.apache.org/jira/browse/CAMEL-10036
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.17.1
Reporter: Jay mann
Priority: Minor
When dynamically loading a Rests xml, you need to call:
{code}
xmlDef.asRouteDefinition(camelContext);
{code}
to created the routes, but it creates routes for every RestConfiguration in the camelContext. This can result in duplicate route errors.
We should also be able to choose which RestConfiguration to bind to. Can we get the following Method added to org.camel.model.rest.RestDefinition:
{code}
public List<RouteDefinition> asRouteDefinition(CamelContext camelContext, RestConfiguration restConfig) {
// sanity check this rest definition do not have duplicates
validateUniquePaths();
List<RouteDefinition> answer = new ArrayList<RouteDefinition>();
addRouteDefinition(camelContext, answer, restConfig.getComponent());
return answer;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)