diff options
-rw-r--r-- | shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java b/shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java index 330e5f44e8..49d66321ea 100644 --- a/shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java +++ b/shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java @@ -151,9 +151,11 @@ public class VaadinResourceTrackerComponent { */ @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); + } } } |