You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sothach <ph...@gmail.com> on 2013/04/11 11:50:41 UTC

Modifying exchange in a Converter?

Is it considered bad practice to modify the exchange in a converter?
I feels wrong to me, but sometimes that's the best/only place to say extract
a business value from an object (e.g., in.body) and make it available to
other parts of the route (e.g., in.header) that don't need to know the type
of the body.



--
View this message in context: http://camel.465427.n5.nabble.com/Modifying-exchange-in-a-Converter-tp5730710.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Modifying exchange in a Converter?

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah I think its more okay if the types being converted to is a custom
type, eg such as com.foo.mycompany.MyCustomer etc.
And that its documented this happens / so people would know that this
is by design.




On Thu, Apr 11, 2013 at 11:50 AM, sothach <ph...@gmail.com> wrote:
> Is it considered bad practice to modify the exchange in a converter?
> I feels wrong to me, but sometimes that's the best/only place to say extract
> a business value from an object (e.g., in.body) and make it available to
> other parts of the route (e.g., in.header) that don't need to know the type
> of the body.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Modifying-exchange-in-a-Converter-tp5730710.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Modifying exchange in a Converter?

Posted by Christian Müller <ch...@gmail.com>.
No, it's not.

Sent from a mobile device
Am 11.04.2013 19:43 schrieb "sothach" <ph...@gmail.com>:

> Is it considered bad practice to modify the exchange in a converter?
> I feels wrong to me, but sometimes that's the best/only place to say
> extract
> a business value from an object (e.g., in.body) and make it available to
> other parts of the route (e.g., in.header) that don't need to know the type
> of the body.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Modifying-exchange-in-a-Converter-tp5730710.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>