felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: declarative Services
Date Sun, 02 Jun 2013 11:45:21 GMT
Christopher,

Not really; a DS component can do literally everything that a bundle
activator can do. Additionally you can have more than one of them per
bundle, and you have much easier access to services and configuration.

Regards
Neil

On Sun, Jun 2, 2013 at 8:54 AM, Christopher BROWN <brown@reflexe.fr> wrote:

> Hi Peter,
>
> Isn't that a bit like asserting that you only ever need functional
> programming, and not OOP or any other imperative style?
>
> I would tend to agree with your assertion, where DS is the best fit
> solution for most use cases, but having the bundle activator is nice in
> order to handle edge cases.
>
> --
> Christopher
>
>
>
> On 1 June 2013 11:27, Peter Kriens <peter.kriens@aqute.biz> wrote:
>
> > If I had to start over with the design of OSGi there would be no bundle
> > activator, just DS components ... The activator was a mistake since it
> is a
> > singleton and I now sometimes wonder what we are smoking, forcing people
> to
> > handle their own service dependencies. DS's support services, service
> > factories, and more as well as fully handling service dependencies makes
> > services as lightweight as classes. With the DS annotations you can turn
> ay
> > class into a service (factory) whenever you want, not requiring any extra
> > setup. I found it amazing how light weight services became once I could
> do
> > this.
> >
> > You can control the life cycle of the component with config admin using
> > managed service (factories). Config admin can define/override service
> > properties and define which service dependencies are bound by setting the
> > target filter.
> >
> > With DS you do not need the dependency manager since DS handles deps for
> > you.
> >
> > Again, OSGi was not complete until DS was specified.
> >
> > Kind regards,
> >
> >     Peters Kriens
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message