[ 
https://issues.apache.org/jira/browse/CAMEL-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064333#comment-13064333
 ] 

Claus Ibsen edited comment on CAMEL-4217 at 7/13/11 4:01 AM:
-------------------------------------------------------------

Well frankly as Richard says the Java DSL uses the type (boolean, int, String, 
long) etc. for its parameters.

You can use dependency injection to inject a property that has the resolved 
value. In fact there is a JIRA ticket about to add a @PropertyValue or some 
other Camel annotation that can do this for you, so you don't need to rely on 
spring annotation or what else.

We may consider looking into that instead of this. This ensures consistency in 
the Java DSL (I guess also Scala and Groovy DSLs as well). 

But I can also see the point that people are lazy and to add a java property 
and annotation to have the resolved values seems much, when you could have done:
{code}
 .autoStartup("{{shouldStartOrNot}}")
{code}

However maybe we can add String for some of the commonly used parameters where 
people may want to have a property placeholder?

      was (Author: davsclaus):
    Well frankly as Richard says the Java DSL uses the type (boolean, int, 
String, long) etc. for its parameters. 

You can use dependency injection to inject a property that has the resolved 
value. In fact there is a JIRA ticket about to add a @PropertyValue or some 
other Camel annotation that can do this for you, so you don't need to rely on 
spring annotation or what else.

We may consider looking into that instead of this. This ensures consistency in 
the Java DSL (I guess also Scala and Groovy DSLs as well). 

But I can also see the point that people are lazy and to add a java property 
and annotation to have the resolved values seems much, when you could have 
done: .autoStartup("{{shouldStartOrNot}}")
  
> support route autoStartup(String|boolean) in Java DSL
> -----------------------------------------------------
>
>                 Key: CAMEL-4217
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4217
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Ben O'Day
>            Assignee: Ben O'Day
>            Priority: Trivial
>             Fix For: 2.9.0
>
>
> should be able call autoStartup(String|boolean) on a route in the Java DSL 
> (works fine in Spring)...would allow for conditional startup based on 
> properties, etc...

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

        

Reply via email to