diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java')
-rw-r--r-- | bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java index af93f1acb..5506b7ff5 100644 --- a/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java +++ b/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceFactoryTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 Cognos Incorporated, IBM Corporation and others. + * Copyright (c) 2005, 2013 Cognos Incorporated, IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -151,7 +151,9 @@ class ManagedServiceFactoryTracker extends ServiceTracker<ManagedServiceFactory, if (service == null) return null; - addReference(reference, service); + synchronized (configurationStore) { + addReference(reference, service); + } return service; } @@ -178,14 +180,16 @@ class ManagedServiceFactoryTracker extends ServiceTracker<ManagedServiceFactory, } } } - - untrackManagedServiceFactory(reference); - addingService(reference); + synchronized (configurationStore) { + untrackManagedServiceFactory(reference); + addingService(reference); + } } public void removedService(ServiceReference<ManagedServiceFactory> reference, ManagedServiceFactory service) { - untrackManagedServiceFactory(reference); - + synchronized (configurationStore) { + untrackManagedServiceFactory(reference); + } context.ungetService(reference); } |