views:

20

answers:

0

I just recently stumbled upon the fact that Declarative Services in OSGi can set the configuration of a component to required so that the component receives it upon activation, removing the gap between component activation and configuration. I also realized with this that you can receive configuration updates via the modified method.

It seems to me like this functionality is quite similar to that provided by implementing the ManagedService interface and publishing that as one of the "services" you provide.

It seems like I could completely ignore ManagedService & just use the DS configuration injection.

Is one of these techniques preferred over the other or are there other tradeoffs that I'm not seeing?