You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Anton Kirvel <An...@epam.com> on 2010/02/17 15:23:36 UTC

Use placeholders in camel expressions

Hi,
I tried to use jxpath expression like this one:
<camelContext>
 ...
 <choice>
   <when>

     <jxpath>/foo/@value > 1000</jxpath>

     ...

   </when>

    ...

 </choice>

 ...

</camelContext>


I'd like to make 1000 a configurable value. I use property file from spring context.

Is there any way to use spring property injection (like ${propery_name})  in camel expression?



Best Regards,
Anton Kirvel

Re: Use placeholders in camel expressions

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 17, 2010 at 3:23 PM, Anton Kirvel <An...@epam.com> wrote:
> Hi,
> I tried to use jxpath expression like this one:
> <camelContext>
>  ...
>  <choice>
>   <when>
>
>     <jxpath>/foo/@value > 1000</jxpath>
>
>     ...
>
>   </when>
>
>    ...
>
>  </choice>
>
>  ...
>
> </camelContext>
>
>
> I'd like to make 1000 a configurable value. I use property file from spring context.
>
> Is there any way to use spring property injection (like ${propery_name})  in camel expression?
>

Hi

A good place to check is the FAQ
http://camel.apache.org/faq.html

There is a known FAQ about this here:
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html

In Camel 2.3 onwards there is support directly in Camel for that as
Spring cannot let 3rd party frameworks leverage their property
placeholder to the fullest.
http://davsclaus.blogspot.com/2010/02/property-placeholder-galore-in-apache.html

>
>
> Best Regards,
> Anton Kirvel
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus