camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: How to get Exchange from a within a POJO without changing the interface?
Date Tue, 26 Jul 2011 06:06:08 GMT
On Tue, Jul 26, 2011 at 7:39 AM, Jim Talbut <> 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}, ${},
${}, 'This is a String'")

More details at:

> Thanks
> Jim

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message