The aggregation I am using is
public Exchange aggregate(Exchange oldExch, Exchange newExch) {
try{
if (oldExch == null) {
oldExch = new DefaultExchange(new
DefaultCamelContext());
oldExch.getIn().setBody(myList);
}
myList = oldExch.getIn().getBody(List.class);
myList.add(newExch.getIn().getBody(String.class));
oldExch.getIn().setBody(myList);
}catch(Exception ex){
logger.error("Error while aggregating",ex);
}
return oldExch;
}
--
View this message in context:
http://camel.465427.n5.nabble.com/synchronization-issue-tp4956228p4958327.html
Sent from the Camel - Users mailing list archive at Nabble.com.