camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Environment Variables using Simple language
Date Fri, 26 Feb 2010 13:05:51 GMT
Hi

Ah sys in simple language is JVM System Properties, eg the one you have -D with.
What you want is the OS environment variables, eg like JAVA_HOME etc.

I will crete a ticket to add sysenv to the simple language.



On Wed, Feb 24, 2010 at 6:24 PM, ychawla <premiergeneration@yahoo.com> wrote:
>
> Hello All,
> I was unable to get the simple language to read from my environment
> variables in Windows.  I did find a workaround for this that might be
> helpful.  I use the Spring property place holder configurer which I believe
> has more functionality in Camel 2.3.
>
> Here is my workaround.  I wanted to test an windows ENV variable in a simple
> test so I created a bean like this:
>
>       <context:property-placeholder/>
>
>        <bean id="monitorApps" class="java.lang.String">
>                <constructor-arg><value>${MONITOR}</value></constructor-arg>
>        </bean>
>
> and then was able to use it in tests like this:
>
> <simple>${bean:monitorApps.trim} == 'true'</simple>
>
> I was unable to get syntax like this to work:
>
> <simple>${sys.monitorApps} == 'true'</simple>
>
> Hopefully this will help someone out who is looking to do something similar.
>
> Cheers,
> Yogesh
>
> I was unable to get <simple>${bean:monitorApps.trim} == 'true'</simple>
> --
> View this message in context: http://old.nabble.com/Environment-Variables-using-Simple-language-tp27714257p27714257.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
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

Mime
View raw message