See: https://vaadin.com/forum/thread/
17522264/concurrentmodificationexception-in-vaadin-shared-on-karaf-4-2-x
Co-authored-by: Tatu Lund <tatu@vaadin.com>
*/
@Activate
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);
+ }
}
}