felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Pattke <cap5...@web.de>
Subject Dependency Manager - Service does not stop
Date Thu, 05 Jul 2018 16:43:17 GMT
Hello,

I am using a FactoryConfigurationAdapterServer and I have problems to 
unregister the services, when I stop the bundle.

Here is my activator code:

public void init(BundleContext bundleContext, DependencyManager 
dependencyManager) throws Exception {
     dependencyManager.add(
             createFactoryConfigurationAdapterService(
                     JavacordConnector.SERVICE_PID,
                     "configure",
                     true,
                     JavacordConnectorConfiguration.class
             )
             .setImplementation(JavacordConnector.class)
             .setCallbacks(null, "connect", "disconnect", null)
             .add(
                     createServiceDependency()
                             .setService(CommandRegistry.class)
                             .setRequired(false)
.setDefaultImplementation(NOPCommandRegistry.class)
             )
     );
}

Situation:
- bundle is active
- factory adapter is registered
- via config file and ConfigAdmin is a JavacordConnector registered as well

Now when I stop the bundle nothing happens. All services are still 
available, up and running.
How can achieve that all these services will be stopped, once I stop the 
bundle?

Regards
Florian

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message