Skip to content

Commit

Permalink
allow eventNotifiers to be added asynchronously to a CamelContext whi…
Browse files Browse the repository at this point in the history
…le a context is starting up to avoid the dreaded ConcurrentModificationException being thrown, fixes CAMEL-5531

git-svn-id: https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x@1375938 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
davsclaus committed Aug 22, 2012
1 parent 5af0359 commit 78b7fbb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -16,9 +16,9 @@
*/
package org.apache.camel.management;

import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
Expand Down Expand Up @@ -50,7 +50,7 @@
*/
public class DefaultManagementStrategy implements ManagementStrategy, CamelContextAware {

private List<EventNotifier> eventNotifiers = new ArrayList<EventNotifier>();
private List<EventNotifier> eventNotifiers = new CopyOnWriteArrayList<EventNotifier>();
private EventFactory eventFactory = new DefaultEventFactory();
private ManagementNamingStrategy managementNamingStrategy;
private ManagementObjectStrategy managementObjectStrategy;
Expand Down

0 comments on commit 78b7fbb

Please sign in to comment.