Hey ! A picture is sometime better than explication :) I try to make a really simple test ( equivalent of MAP with lookup in ETL) :
------------------------- | TABLE TEST | ------------------------- | COL1 | COL2 | | jack | 2 | | bob | 3 | ------------------------ | | | | | ---------------- ---------------------- ------------------------ | FILE INPUT | | ENRICH ? | | FILE OUTPUT | ---------------- ---------------------- ----------------------- | jack | cool | >>>>>>>>> | | >>>>>>>>> | jack | cool | 2 | | bob | foo | | | | bob | foo | 3 | ---------------- ----------------------- ------------------------ 2013/3/6 Jean Francois LE BESCONT <jflebesc...@gmail.com> > If i do: > public class AggregationStrategyRessource implements AggregationStrategy { > > @Override > public Exchange aggregate(Exchange original, Exchange resource) { > int i = 1 / 0; > return original; > } > } > > no exception are thows. > > > > 2013/3/6 Jean Francois LE BESCONT <jflebesc...@gmail.com> > >> thks Raul >> >> For the moment it's a simple : >> >> public class AggregationStrategyRessource implements AggregationStrategy { >> >> @Override >> public Exchange aggregate(Exchange original, Exchange resource) { >> return original; >> } >> >> } >> >> If I put a debug point on it, it is never fired .... >> >> >> >> >> >> 2013/3/6 Raúl Kripalani <r...@evosent.com> >> >>> Can we see the code of AggregationStrategyRessource? >>> >>> Regards, >>> Raúl. >>> >>> On Mar 5, 2013, at 23:30, Jean Francois LE BESCONT wrote: >>> >>> > Hey, >>> > >>> > I have this > >>> > >>> http://camel.465427.n5.nabble.com/Enrich-message-with-data-from-dynamic-sql-query-td5329427.html >>> > >>> > But I haven't found a solution to my question. >>> > >>> > How can enrich my stream with data from a queries ? >>> > >>> > I have a a route called from the start : >>> > >>> > from("direct:refreshReferentielDynamic") >>> > // >>> > .setBody(constant("SELECT * FROM TEST")) >>> > // >>> > .to("jdbc:dataSource") >>> > // >>> > .to("direct:ds") >>> > // >>> > .end(); >>> > >>> > >>> > End I would like to acces data in memory in direct:ds from an other >>> route. >>> > I have try this : >>> > >>> > from("foo"). >>> > [...] >>> > .enrich("direct:ds", new AggregationStrategyRessource()) >>> > >>> > But code in AggregationStrategyRessource is not called ... and body is >>> > replace by the content of the query. >>> > >>> > Thks ! >>> > >>> > Thks ! >>> >>> >> >