felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: declarative Services
Date Thu, 06 Jun 2013 09:21:42 GMT
I have at times also struggled with DS when I moved from Blueprint. Within
a Bundle if there are some internal services which are used by various DS
Components *within* that bundle then is it fine to

1. Register these internal services as DS components but with classes which
are not part of Export-Package list i.e. private classes
2. Have other DS Components within that bundle refer to these services as
references


Chetan Mehrotra


On Thu, Jun 6, 2013 at 2:42 PM, Michael Täschner <m.taeschner@gmail.com>wrote:

> Hi Neil,
>
> thanks for the info. Yes that is what you taught last year as well. I just
> thought maybe this would be a nice to have extension for component DI
> inside bundles without exposing services to the registry. Of course, since
> provided by the same bundle, direct Java reference makes sense and is
> clearer. I also understand this makes it more streamlined in regard to
> lifecycle managment.
>
> Thanks and Regards,
> Michael
>
>
> 2013/6/6 Neil Bartlett <njbartlett@gmail.com>
>
> > Hi Michael,
> >
> > Declarative Services components can have full control over the lifecycle
> of
> > classes within their bundle using Java code. I see this as much clearer
> and
> > safer than using XML.
> >
> > Of course DS components can always access services from the OSGi service
> > registry, including services that happen to be published from by other DS
> > components in the same bundle.
> >
> > Regards,
> > Neil
> >
> >
> > On Thu, Jun 6, 2013 at 9:54 AM, Michael Täschner <m.taeschner@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > I have a question regarding DS and component interaction inside bundles
> > - I
> > > can see no explicit support here in the DS spec ? In blueprint this is
> > > realized via beans, but what would be the proposed approach for DS ?
> > >
> > > Thanks and Regards,
> > > Michael
> > >
> > >
> > > 2013/6/4 Carsten Ziegeler <cziegeler@apache.org>
> > >
> > > > Just to add: the Felix SCR annotations also generate metatype
> > information
> > > > and I prefer the typesafe way.
> > > >
> > > > But as Neil said, this is more personal preference/taste, it would be
> > > nice
> > > > to have just one set of annotations. But as long as they have
> different
> > > > feature sets this will be hard to achieve.
> > > >
> > > > Carsten
> > > >
> > > >
> > > > 2013/6/3 Neil Bartlett <njbartlett@gmail.com>
> > > >
> > > > > Hi Jorge,
> > > > >
> > > > > To an extent it is personal preference.
> > > > >
> > > > > I still prefer the bnd annotations because they are a little bit
> more
> > > > > succinct -- i.e. with shortcuts for the most common combinations
--
> > and
> > > > > also they have additional support for generating configuration
> > metadata
> > > > > document according to the Metatype Service Specification.
> > > > >
> > > > > Others prefer the DS annotations (or the Felix SCR annotations, yet
> > > > another
> > > > > variation!) because they have a more typesafe way to express
> > component
> > > > > properties.
> > > > >
> > > > > Regards,
> > > > > Neil
> > > > >
> > > > >
> > > > >
> > > > > On Mon, Jun 3, 2013 at 4:46 PM, bokie <jms.cercas@gmail.com>
> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > After playing around with DS this weekend I can honestly say
that
> > if
> > > > you
> > > > > > haven't tried it, you don't know what you're missing - I can
> relate
> > > to
> > > > > > pkrien's post.
> > > > > >
> > > > > >  - Excellent dependency management  abstraction.
> > > > > >  - Configuration is a real breeze.
> > > > > >  - Controlling a component's lifecycle is also accomplished
> really
> > > > > easily.
> > > > > >  - Less boilerplate tasks and greater productivity.
> > > > > >
> > > > > > With respect to annotations; what should we be using - bnd or
> DS? I
> > > > > > understand that they are only read during compile time to create
> > the
> > > DS
> > > > > xml
> > > > > > descriptor, does is really matter or is it merely a personal
> > > > preference.
> > > > > >
> > > > > > Regards,
> > > > > > Jorge
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://apache-felix.18485.x6.nabble.com/declarative-Services-tp5003596p5003643.html
> > > > > > Sent from the Apache Felix - Users mailing list archive at
> > > Nabble.com.
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > > > For additional commands, e-mail: users-help@felix.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Carsten Ziegeler
> > > > cziegeler@apache.org
> > > >
> > >
> >
>

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