On May 31, 2013, at 3:10 PM, bokie <[email protected]> wrote:

> I'm quite comfortable with OSGi and Felix but have I've never used
> Declarative Services. I've started reading up on the topic and started to
> ask my self some questions with respect to how I currently do things:
> - Are there any real benefits in using Declarative Services?

yes.  You can set up your services declaratively, including all the references. 
 For instance you don't need a service tracker for each service you want to 
use.  It's very compact yet powerful. Unlike blueprint, it fits osgi very well, 
as  the basic unit of configuration is a service.  (I'm not really familiar 
with IPOJO).

> - How does Declarative Services "integrate" with the the Configuration
> Admin?

Really well, although it's not explained well in the specs.  Basically you can 
get ManagedService or ManagedServiceFactory functionality for your DS component 
by specifying a configuration pid (or using the default), specifying 
configuration policy required, and supplying a configuration with the pid or a 
bunch of configurations with factoryPID equal to the component pid.. If you 
include a modified method when the configuration is updated your component will 
be notified, otherwise it will be deactivated and reactivated with a new 
instance.  If your component exposes a service then the configuration 
properties are exposed as service properties (except for private properties 
starting with '.').  Felix DS has some extensions proposed for the next DS spec 
so that your component can modify the service properties easily from lifecycle 
methods.
> - How does Declarative Services "integrate" with the the Dependency Manager

I don't know what the Dependency Manager is, but DS manages all the service 
dependencies from references itself.

hope this helps
david jencks

> 
> 
> 
> --
> View this message in context: 
> http://apache-felix.18485.x6.nabble.com/declarative-Services-tp5003596.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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