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

Luigi De Masi updated CAMEL-16058:
----------------------------------
    Description: 
There is no option to configure allowOptimisedComponents for toD EIP using Java 
DSL, it can only be configured in an XML route.
 The only option available is to define a {{ToDynamicDefinition}} and add it to 
the route definition, for example:
{code:java}
public class TestRouteBuilder extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        ToDynamicDefinition tdd = new ToDynamicDefinition();
        tdd.setUri("direct:${header.whereto}");
        tdd.setIgnoreInvalidEndpoint(false);
        tdd.setPattern(ExchangePattern.InOut);
        tdd.setAllowOptimisedComponents(true);
        
        RouteDefinition route = 
                from("direct:start")
                .log(LoggingLevel.INFO, "This is a test");
        
        route.addOutput(tdd);
    }
}
{code}

  was:
There is no option to configure allowOptimisedComponents for toD EIP using Java 
DSL.
The only option available is to define a {{ToDynamicDefinition}} and add it to 
the route definition, for example:

{code:java}
public class TestRouteBuilder extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        ToDynamicDefinition tdd = new ToDynamicDefinition();
        tdd.setUri("direct:${header.whereto}");
        tdd.setIgnoreInvalidEndpoint(false);
        tdd.setPattern(ExchangePattern.InOut);
        tdd.setAllowOptimisedComponents(true);
        
        RouteDefinition route = 
                from("direct:start")
                .log(LoggingLevel.INFO, "This is a test");
        
        route.addOutput(tdd);
    }
}
{code}



> [camel-core] There is no option to configure allowOptimisedComponents in toD 
> EIP using Java DSL
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16058
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16058
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Luigi De Masi
>            Assignee: Luigi De Masi
>            Priority: Minor
>
> There is no option to configure allowOptimisedComponents for toD EIP using 
> Java DSL, it can only be configured in an XML route.
>  The only option available is to define a {{ToDynamicDefinition}} and add it 
> to the route definition, for example:
> {code:java}
> public class TestRouteBuilder extends RouteBuilder {
>     @Override
>     public void configure() throws Exception {
>         ToDynamicDefinition tdd = new ToDynamicDefinition();
>         tdd.setUri("direct:${header.whereto}");
>         tdd.setIgnoreInvalidEndpoint(false);
>         tdd.setPattern(ExchangePattern.InOut);
>         tdd.setAllowOptimisedComponents(true);
>         
>         RouteDefinition route = 
>                 from("direct:start")
>                 .log(LoggingLevel.INFO, "This is a test");
>         
>         route.addOutput(tdd);
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to