Can you provide a simple test case so that we can more easily dig into it and fix it?
Best, Christian ----------------- Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller/11/551/642 On Tue, Feb 11, 2014 at 10:19 PM, florin <[email protected]> wrote: > Trying to use a Groovy script inside a Camel (version 12.2.1) validator I > encountered the problem that the validator returns always the result form > first evaluation (from first message) for subsequent messages. By looking > into the code (/org.apache.camel.builder.script.ScriptBuilder/) I noticed > that this is caused by calling /result = compiledScript.eval()/; in > /runScript/ method without passing as a parameter the recently updated > context (in /populateBindings /) and so the cached context from compilation > time(first execution) is always used. > A quick solution (for testing purpose) was to recompile the camel-scripting > component after changing the above mentioned call to /result = > compiledScript.eval(getScriptContext())/; > > > > ----- > Florin > -- > View this message in context: > http://camel.465427.n5.nabble.com/Groovy-compiled-scripts-cache-execution-context-tp5747131.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
