Hi,
as soon as I add a ServiceDependency to my component, Felix tries to
start the service -- before I set the implementation and before I add
the the component to the DM.
I would expect, it waits until I finally add the component to the DM?
Am I doing something wrong?
Thank you
Hubert
public void init(BundleContext bundleContext, DependencyManager
dependencyManager) throws Exception {
Component component = dependencyManager.createComponent();
ServiceDependency serviceDependency = createServiceDependency();
serviceDependency.setService(LoggingServiceImpl.class);
serviceDependency.setRequired(true);
<<<<
component.add(serviceDependency); // goes to
ComponentImpl#calculateNewState() from here
>>>
component.setImplementation(LoggingConfigService.class);
String[] classes = new
String[]{LoggingConfigService.class.getName(),
ManagedService.class.getName()};
component.setInterface(classes, properties);
dependencyManager.add(component); // thought it should go
to calculateNewState() from here ??
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]