The WindSplitterPojo simply returns List<Message> containing two messages that come data in the input message body. We copy the body headers to the result messages.
It is thread safe, it has no state, ie there are no object fields that are modified. The method is like this it is edited for clarity/privacy: public List<Message> splitMessage( @Headers Map<String, Object> headers, @Body WindVector body) { List<Message> messages = new ArrayList<>(reports.size()); DefaultMessage x = new DefaultMessage(); x.setBody(body.getX()); x.setHeaders(new HashMap<String, Object>(headers)); DefaultMessage x = new DefaultMessage(); x.setBody(windSpeed); x.setHeaders(new HashMap<String, Object>(headers)); DefaultMessage y = new DefaultMessage(); y.setBody(body.getY()); y.setHeaders(new HashMap<String, Object>(headers)); DefaultMessage x = new DefaultMessage(); y.setBody(windSpeed); y.setHeaders(new HashMap<String, Object>(headers)); ArrayList<Message> result = new ArrayList<Message>(2); result.add(x); result.add(y); return result; } Claus Ibsen-2 wrote > Yeah seems like a bug. Feel free to log a JIRA ticket > > Do you do anything special in (new WindSplitterPojo() ? > eg what do you return? > > If you can then feel free to post the code, or if not, then the method > signature so we know what you takes as input, and what it returns as > output. > > > > On Thu, Sep 19, 2013 at 11:44 AM, Joshua Groom > < > joshua.groom@ > > wrote: >> We use camel 2.11.1 running on the oracle 1.7 jvm for linux. >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/ConcurrentModificationException-thrown-from-inside-camel-splitter-tp5739793p5739814.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: > cibsen@ > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen -- View this message in context: http://camel.465427.n5.nabble.com/ConcurrentModificationException-thrown-from-inside-camel-splitter-tp5739793p5739842.html Sent from the Camel - Users mailing list archive at Nabble.com.