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: Groovy compiled scripts cache execution context
Date Wed, 12 Feb 2014 09:10:10 GMT
Hi

Should be fixed in upcoming 2.12.3 release.

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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Mime
View raw message