See: https://vaadin.com/forum/thread/17522264/concurrentmodificationexception-in-vaadin-shared-on-karaf-4-2-x Co-authored-by: Tatu Lund <tatu@vaadin.com>tags/8.14.1
*/ | */ | ||||
@Activate | @Activate | ||||
protected void activate(BundleContext context) { | protected void activate(BundleContext context) { | ||||
vaadinSharedContext = context; | |||||
for (Delegate<?> registration : resourceToRegistration.values()) { | |||||
registration.register(vaadinSharedContext, vaadinService); | |||||
synchronized (resourceToRegistration) { | |||||
vaadinSharedContext = context; | |||||
for (Delegate<?> registration : resourceToRegistration.values()) { | |||||
registration.register(context, vaadinService); | |||||
} | |||||
} | } | ||||
} | } | ||||