On Mon, Jan 4, 2010 at 8:43 AM, yaog <yairo...@gmail.com> wrote:
>
> Thanks.
>
> I have read those links, but... It may be me, but I cannot understand how it
> all hooks up.
>
> What I want to define is a bean that is invoked with a method that gets 3
> parameters.
>
> Scenario is one of the following 2:
>
> 1. Bean a class bean B ant wants to pass 3 parameters and not just one. This
> involves existing interfaces so sending an Object Array is not applicable.
>

You can use a Camel Processor to extract those 3 parameters from the
Camel Exchange and invoke the bean yourself.



> 2. Using a "fork" - a bean should be invoked once receiving message from 3
> different queues. The bean method should be invoked once with the 3
> different objects from the 3 queues sent to it's 3 param method.
>

Hmmm so the bean should first be invoked *after* there are 3 messages
in total, from 3 queues?
Should you wait forever until there are 3 messages, or do you need to
timeout or what?

You can use a Polling Consumer to consume from those 3 queues?
http://camel.apache.org/polling-consumer.html

And then invoke that bean yourself with those 3 parameters.


> I just can't understand where and how I "hook" my custom code to do the
> magic.
>
> Please advise. Example would be great.
>
> Thanks.
> --
> View this message in context: 
> http://old.nabble.com/Routing-to-a-method-of-an-object-with-more-than-one-parameters---part2-tp27002285p27009702.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to