|Re: Using @annotations to define Declarative Services components [message #766746 is a reply to message #766496]
||Fri, 16 December 2011 10:50
| Ivan Larionov
Registered: July 2009
Bnd tools for Eclipse seem to be able to generate component definition
xml from annotations.
Since you have asked for thoughts...
With reference to your last statement, in my opinion there are some
reasons why annotations have not been considered.
Firstly, deferred loading of classes is constantly mentioned in the OSGi
spec. And processing annotation in runtime would involve component class
discovery which leads to class loading.
Secondly, OSGi may run in java 1.4 jre where there are no annotations.
Though it seems to be a wild guess as I do not know which version of
java the current OSGi spec is aiming at.
On 16.12.2011 0:13, Darren Janeczek wrote:
> Hello all, I'd like to start a discussion here. My first glance through
> the search engine here didn't seem to have anything, so I hope I'm not
> being too redundant.
> I am curious if there has been much interest, discussion, future plans,
> or progress in implementing a definition for declarative service
> components via @annotations in Equinox.
> It strikes me as a very natural and sugary way to express ds components,
> and offers the added joy of a single centralized definition. Would
> officially supporting and implementing this fit within the goals of the
> equinox.ds project?
> And would it be reasonable to have an approach that processes these
> annotations at run-time vs pre-processing them into xml at build-time?
> Here are some similar approaches:
Powered by FUDForum
. Page generated in 0.02367 seconds