Hi Barry

Thanks for reporting.

It is of course a bit unusual to add routes concurrently. As often the
startup procedure of CamelContext is invoking its start() method from
a single thread, which then startup all the routes.

However we would like it to be possible to add routes at runtime
concurrently. Although it may be a easier fix to synchronize the
addRoutes methods. I wonder if there could be reason where ppl want
this to go faster?

You got any old stacktraces left?

I guess the lifecycle list should be changed to a CopyOnXXX List which
is thread safe.


On Fri, Sep 23, 2011 at 12:06 AM, Barry Kaplan <grou...@memelet.com> wrote:
> The problem is due to the variable DefaultCamelContext.lifecycleStrategies
>
> One thread can be adding to that list via addLifecycleStrategy while another
> thread can be iterating thru the collection. For me I'm adding routes from
> multiple threads.
>
> I saw a jira issue for this quite a ways back but it is closed.
>
> I'm running 2.7.2
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ConcurrentModificationException-added-routes-from-multiple-threads-tp4831653p4831653.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to