Hi,

So, as already said:
@ServiceProperty are published with the service registration (if and only if their value is not null). It manages property updates: if the field value changes, the service registration is updated with the new value. (Service Property annotations target fields only). As they are published, they are used during the filter matching of a service lookup @Property are component instance properties. They are not published with the service registration. This annotation targets fields and method (setter method)

So now what about the configuration admin. Both can be set by using the configuration admin (and so with .cfg file of File Install [http://ipojo-dark-side.blogspot.com/2009/04/ipojo-and-file-install-configuring.html ]) if it's a factory configuration. In fact, factory configurations are interpreted by iPOJO as component instance creation (or reconfiguration if the configuration is just updated).

iPOJO also supports 'propagation'. When enabled, every unknown component (so not a @Property) properties received during the creation or a reconfiguration are propagated to the service registration. The iPOJO - DOSGi tutorial [http://felix.apache.org/site/apache-felix-ipojo-dosgi.html ] uses this feature to configure an instance in order to publish it remotely. It adds the osgi.remote.* properties. As those properties are unknown, and as the propagation is enabled, these properties will be published with the service registration.

Regards,

Clement

On 27.08.2009, at 00:14, Marcel Offermans wrote:


On Aug 26, 2009, at 23:26 , Joel Schuster wrote:

So the ConfigAdmin can actually be used to dynamically set either,

ConfigAdmin will only get the config to the component, you have to propagate these properties to the service properties in your component manually. That being said, for example the dependency manager has a feature that automates that process (and probably others have too). So yes, you could summarize that like you do.

but only the Service Property is used for lookups (filters) and such?

Absolutely.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to