camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: How to get Exchange from a within a POJO without changing the interface?
Date Tue, 26 Jul 2011 06:12:28 GMT
I use the occasion to thank you Claus, this improvement is really useful :)

it will save a lot of wrapper files.

- Romain

2011/7/26 Claus Ibsen <claus.ibsen@gmail.com>

> On Tue, Jul 26, 2011 at 7:39 AM, Jim Talbut <jtalbut@spudsoft.co.uk>
> wrote:
> > Hi,
> >
> > I have a POJO that benefits from having a non-Camel interface (it means I
> > can know that the interface matches that of a given web service).
> >
> > Internally this POJO needs to extract a couple of properties from the
> > Exchange.
> >
> > Is there any way to get the "currently executing Exchange" without adding
> it
> > as a parameter to the POJO?
> > Most useful for me would be either a static method or a method on the
> > CamelContext, because they would allow me to move the Camel-specific
> > processing into a separate bean.
> >
>
> On trunk I have improved the bean component, so you can bind the
> parameters in the method name option.
> .to"(bean:myBean?method=myMethod(${body}, ${header.foo},
> ${header.bar}, 'This is a String'")
>
> More details at:
> http://camel.apache.org/bean-binding.html
>
>
>
> > Thanks
> >
> > Jim
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

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