Re: Consume from a java bean

2013-11-21 Thread Claus Ibsen
gt; Thank you for your answers Claus. > From: Claus Ibsen-2 [via Camel] > [mailto:ml-node+s465427n574358...@n5.nabble.com] > Sent: mercredi 20 novembre 2013 21:16 > To: VANSILIETTE Florent > Subject: Re: Consume from a java bean > > Ah okay, yeah you can do from(bean) but th

RE: Consume from a java bean

2013-11-21 Thread flovansi
I guess it's easier and cleaner to create a custom Camel Component. Thank you for your answers Claus. From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n574358...@n5.nabble.com] Sent: mercredi 20 novembre 2013 21:16 To: VANSILIETTE Florent Subject: Re: Consume from a java bean Ah okay,

Re: Consume from a java bean

2013-11-20 Thread Claus Ibsen
Ah okay, yeah you can do from(bean) but then Camel will just keep calling the method on the bean in endless loop, using a single threaded consumer. So if there is no messages on the JMS queue to process you would need to sleep the thread or something as there is no message for Camel to route. You

Re: Consume from a java bean

2013-11-20 Thread flovansi
I m not sure it'll be possible with the @Consume annotation. I want to be able to create an exchange in the POJO and to manage manually the JMS transaction when consuming message. If I've well understood, the @Consume annotation cannot fit in this case as we have to specify an endpoint t

Re: Consume from a java bean

2013-11-20 Thread Claus Ibsen
Hi Yeah see http://camel.apache.org/pojo-messaging-example.html You dont need a route if you use a pojo with the @Consume annotation as shown in that example. On Wed, Nov 20, 2013 at 5:29 PM, flovansi wrote: > Hi all, > > Is it possible to consume message from a Java bean? > > Something like: