Hi,
I am trying to create a ManagedServiceFactory implementation and have so
far failed to get it to work using SCR metadata. The plugin
documentation is somewhat confusing; is it impossible to use a dynamic
service declaration for a ManagedServiceFactory?
(http://felix.apache.org/site/apache-felix-maven-scr-plugin.html)
What I have is this
@Service(ManagedServiceFactory.class)
@Component(label = "Test service factory", metatype = true)
@Properties({
@Property(name = "service.pid", value =
"org.acme.FactoredType.factory")
})
public class TestServiceFactory implements ManagedServiceFactory {
@Property(value = "defaultValue")
public static final String SOME_PROPERTY = "someProperty";
// implementation...
}
However The service shows up like a regular Service in the felix config
admin. I can edit the @Property, and the config is persisted in the
admin service, however none of the implemented ManagedServiceFactory
methods get called. Do I need to use the factory... properties of the
@Component annotation? Is it necessary to manually register the service?
Any hint is appreciated!
Thanks,
Olaf
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]