Hello,
I'm facing a situation that I'm not understanding. I'm using
org.apache.felix.scr 2.0.2.
I've set a component with this annotation:
@Component(enabled = true, configurationPolicy =
ConfigurationPolicy.REQUIRE,
scope = ServiceScope.PROTOTYPE, service =
FixedControllerService.class,
configurationPid = {SERVICE_FACTORY_PID_CONTROLLER})
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0"
name="com.c4biz.feast.ComponentControllerServiceProvider"
configuration-policy="require" enabled="true" activate="activate"
deactivate="deactivate" modified="modified"
configuration-pid="fixed.controller">
<implementation
class="com.c4biz.feast.ComponentControllerServiceProvider"/>
<service scope="prototype">
<provide interface="com.c4biz.feast.FixedControllerService"/>
</service>
</scr:component>
In this component class I have a method (activate()) tagged with
@Activate annotation. And there are any reference bind being used for now.
From another bundle I'm creating a configuration using factoryPID =
SERVICE_FACTORY_PID_CONTROLLER.
Interesting is that the service are being created and with in a proper
autogenerated PID and passed properties. At least I can see it when
listing the services using gogo console.
also scr:list tells me that the component is enabled and satisfied.
What I'm not understanding is that the activate method is not being
called...
could someone explain me what am I missing here?
thanks,
Cristiano