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: [camel-velocity] Additional context objects possible to inject?
Date Sat, 12 Mar 2011 17:14:37 GMT
On Sat, Mar 12, 2011 at 10:32 AM, Stephan <stephanisworking@gmx.de> wrote:
> Hi,
>
> currently I'm playing arround with camel-velocity in order to decide,
> whether we can easily introduce Camel and reuse our existing Velocity
> templates (a lot).
>
> Our current templates using many different context objects with names like
> $config, $baseUrl and so on. These objects are "global" values and not part
> of the message itself and therefore in term are not accessible in the
> template, using the new Camel "way".
>
> Havin read the documentation for camel-velocity so far, I found out, that
> the message body will be set into the template context using the name $body,
> but there seems to be no way in order to set additional objects (for example
> spring beans).
>
> I'm thinking of something like:
>
> to("velocity://templatePath?config=${bean:configBean})
>
> in order to set additional objects into the velocity template. Is there such
> a mechanism available?
>

No there is not.



> Thanks in advance.
>
> Regards
> Stephan
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message