camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: Groovy compiled scripts cache execution context
Date Tue, 11 Feb 2014 22:32:01 GMT
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 <florin.f.manea@gmail.com> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message