On Fri, May 28, 2010 at 10:57 AM, marcin80 <[email protected]> wrote:
>
> Thanks Claus,
>
> I've changed my route
>
> <camel:route>
> <camel:from uri="activemq:topic:output"/>
> <camel:aggregate batchSize="5" groupExchanges="true">
> <camel:correlationExpression>
> <camel:constant/>
> </camel:correlationExpression>
> <camel:to uri="bean:testBean?method=test"/>
> </camel:aggregate>
> </camel:route>
>
> Outside camel context I've defined bean
>
> <bean id="testBean" class="pl.com.agora.uom.services.aliases.MyBean"/>
>
> whitch contains only one method:
>
> public void test(Object o) {
>
> System.out.println("Call test method");
> System.out.println("Argument: "+o);
> }
>
> Now method "test" print:
>
> Argument: null
> Argument: null
> ...
>
> What I'm doing wrong?
>
Change the type to
public void test(@Property(Exchange.GROUPED_EXCHANGE)
List<Exchange> exchanges)
Maybe we in the future can make that a bit easier to do so you can
just have Object or List as argument and Camel detects is a grouped
exchange and extracts that property itself automatic for you. Let me
create a ticket for that.
> Cheers,
> Marcin
> --
> View this message in context:
> http://old.nabble.com/camel-aggregator-tp28697161p28704372.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