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