You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by de...@accenture.com on 2011/07/22 13:57:17 UTC

Refer to java constant from Simple Expression language

Hi,

I am using simple expression language to define

<camel:choice>
                        <camel:when>
                                <camel:
                                        <camel:simple>${in.headers.abc} ==                                                              'xyz'</camel:simple>

Instead of hard coding 'xyz' I would like to reference it from a constants file (Constants.XYZ). Is that possible in Spring DSL? Or is Java DSL the only option?

Please recommend.

Thanks,
Deepa



  ________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

Re: Refer to java constant from Simple Expression language

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 22, 2011 at 1:57 PM,  <de...@accenture.com> wrote:
> Hi,
>
> I am using simple expression language to define
>
> <camel:choice>
>                        <camel:when>
>                                <camel:
>                                        <camel:simple>${in.headers.abc} ==                                                              'xyz'</camel:simple>
>
> Instead of hard coding 'xyz' I would like to reference it from a constants file (Constants.XYZ). Is that possible in Spring DSL? Or is Java DSL the only option?
>

That is not possible.

You can use some of the dynamic scripting languages like Groovy for that.
http://camel.apache.org/languages.html


> Please recommend.
>
> Thanks,
> Deepa
>
>
>
>  ________________________________
> This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/