camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Johnson <brad.john...@mediadriver.com>
Subject Re: @Produce vs @ProducerTemplate
Date Thu, 11 Aug 2016 15:14:47 GMT
I'm using 2.15.x in Fuse 6.2 and experimenting with Camel 2.17 and CDI in
Fuse 6.3 which I downloaded.  But I don't really need the Fuse container
for the testing with the CDI test runner.

I really like the way this is all going.

Brad

On Thu, Aug 11, 2016 at 8:32 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> What version of Camel are you using?
>
> From Camel 2.16 onwards @Produce / proxy should use bean parameter
> binding by default
> http://camel.apache.org/using-camelproxy.html
>
> On Mon, Aug 8, 2016 at 4:02 PM, Brad Johnson
> <brad.johnson@mediadriver.com> wrote:
> > I use producer template quite a bit and it works well but it obviously
> is a
> > bit more coupled to the Camel API than using the @Produce with an
> interface.
> >
> > The problem is I can't tell exactly when @Produce is going to work as I
> > expect it to.  Currently I have two routes, for example, one that makes a
> > call to a direct route to do a look up and return a field during
> > processing.  It works fine.
> >
> > A second route that I have is similar but it sends a String fileName to a
> > an error route to send and email via a velocity template.  If I use the
> > ProducerTemplate that works fine.  If I use the @Produce what I end up
> with
> > is the body rendered showing the BeanInvocation proxy itself with the
> > actual body to be rendered contained with in it.
> >
> > I ran into this before in an different situation and ended up removing
> the
> > @Produce although I was actually able to cause it to work correctly by an
> > indirect bean call on it which seems to have cause the proxy to divulge
> its
> > contents.
> >
> > In this particular case I'm invoking the interface which sends it to a
> > second route that sets other information like to/from/subject and then
> uses
> > a recipientList to invoke the velocity template I've specified for that
> > particular error message.
> >
> > Brad
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

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