diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java b/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java index 4ccaf57c19..14ad6670a8 100644 --- a/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java +++ b/sca-java-2.x/trunk/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoveryActivator.java @@ -30,15 +30,20 @@ import org.osgi.framework.BundleContext; */ public class EquinoxServiceDiscoveryActivator implements BundleActivator { // private static final Logger logger = Logger.getLogger(EquinoxServiceDiscoveryActivator.class.getName()); + private EquinoxServiceDiscoverer discoverer; public void start(BundleContext context) throws Exception { - EquinoxServiceDiscoverer discoverer = new EquinoxServiceDiscoverer(context); + discoverer = new EquinoxServiceDiscoverer(context); ServiceDiscovery.getInstance().setServiceDiscoverer(discoverer); // logger.info("Equinox-based service discoverer is now configured."); } public void stop(BundleContext context) throws Exception { ServiceDiscovery.getInstance().setServiceDiscoverer(null); + if (discoverer != null) { + discoverer.stop(); + discoverer = null; + } } } |