On Monday, October 04, 2010 09:59:14 am Emmanuel Bernard wrote:
@InjectService
Why not JSR-303's @Inject with a qualifier if you really need some
additional metadata?
I am not against the idea so much. The problems I had were twofold:
1) Personally I have no idea how to define these "qualifiers" in the way I need
and no one I ask seems to be able to tell me how to either. I need to be able
to say:
(a) that an injection is optional
(b) the service role to inject (the default is the type where @Inject is
applied).
So how can I do that?
2) @Inject, iiuc, can be applied in numerous contexts and is really quite
broad. In my little injector code I don't want to have to support all this.
My main focus is
a) services that are able to be "managed" by other means (spring, jboss-mc,
weld, etc)
b) a dead simple built in manager for managing the services, really this is a
legacy requirement for "property based bootstrapping" like we have before.
Personally I think y'all are getting a little too hung up the on injection of
dependent services here. It is a quite limited scope and the implementation
is both dead simple and already done (its not like this is going to drag on
for years like we have seen elsewhere).
--
Steve Ebersole <steve(a)hibernate.org>
http://hibernate.org