Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Not sure if this is the case in DI jobs as well, but it seems that if you want to override the value of a context variable using Java in a cConfig in a Route, you HAVE to do this:
context.variable1 = "new value";
and that this
context.setProperty("variable1", "new value");
will not work, even though the code compiles and runs.....
I would like to iterate through a separate collection of context variable names and values and set them programmatically, so I can't do this using the context.variable1 = "new value"; approach. I need to be able to pass in name, value pairs...
Is there anyway of overriding context variables in the way I would like to do?
thanks
n
yes - thanks for the reply.
I guess my only concern is how supported is this approach -
* using context_param
* calling readContextValues()
- in future versions after 6.4 and beyond?
There is also the option to load up properties from files, into the camel context. And I think accessing the apache context is possible from any component using ether the {{var}} notation or "camelContext.resolvePropertyPlaceholders("{{var}}")?
Which would you recommend/support?
Hi Shong
Would still be very interested to know what Talend would officially support re my last post?
Cheers
n