felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf Otto <o...@x100.de>
Subject ManagedServiceFactory and SCR metadata
Date Tue, 25 Oct 2011 11:13:14 GMT

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? 

What I have is this

@Component(label = "Test service factory", metatype = true)
     @Property(name = "service.pid", value = 
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!

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

View raw message