Sorry all. Please ignore the above thread. It was an issue with the way I had
created the myList object in the MyListAggregation (AggregationStrategy)
class. I had it as a global variable.
The below works...
public Exchange aggregate(Exchange oldExch, Exchange newExch) {
try{
List myList = null;
if (oldExch == null) {
oldExch = new DefaultExchange(new
DefaultCamelContext());
myList = new ArrayList();
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-tp4956228p4958346.html
Sent from the Camel - Users mailing list archive at Nabble.com.