Hi

Ticket created
https://issues.apache.org/activemq/browse/CAMEL-2503

And the new feature has been implemented.
You can now use sysenv to refer to a system environment variable.


On Fri, Feb 26, 2010 at 2:05 PM, Claus Ibsen <[email protected]> wrote:
> 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 <[email protected]> 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
>



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

Reply via email to