-
1. Re: Named qualifier, Weld not inline with spec
nickarls Feb 9, 2010 8:31 AM (in response to chasetec)Hmm, could you file a JIRA.
I don't understand the final section of 3.11:
If any other injection point declares a @Named annotation that does not specify the value member, the container automatically detects the problem and treats it as a definition error.
What does declaration have to do with this?
-
2. Re: Named qualifier, Weld not inline with spec
nickarls Feb 9, 2010 8:33 AM (in response to chasetec)More exactly, what does
another injection point declares
have to do with this? Why can't I inject the same @Named in two places? -
3. Re: Named qualifier, Weld not inline with spec
gavin.king Feb 9, 2010 8:46 AM (in response to chasetec)Nick,
any other injection point
means an injection point that is not a field. -
4. Re: Named qualifier, Weld not inline with spec
nickarls Feb 9, 2010 9:08 AM (in response to chasetec)(oh you are awake, mailed you about the same thing before seeing your post here)
You can't inject the same @Named in a producer methdod/initializer/observer?
-
5. Re: Named qualifier, Weld not inline with spec
swd847 Feb 9, 2010 12:22 PM (in response to chasetec)You cannot deduce the name from the parameter name because the compiler is not required to store it in the class file (and even if it does you can't access it with reflection, you would need to register a javaagent and pull them out of the LocalVariableTable attribute of the class file, or other such trickery).
The spec does allow you to inject an @Named parameter you just have specify the name in the annotation.
-
6. Re: Named qualifier, Weld not inline with spec
nickarls Feb 9, 2010 1:11 PM (in response to chasetec)Ah, yes, that explains it...
-
7. Re: Named qualifier, Weld not inline with spec
chasetec Feb 12, 2010 6:25 PM (in response to chasetec)I was wondering about the other injection point thing to.
Nicklas Karlsson wrote on Feb 09, 2010 08:31:
Hmm, could you file a JIRA. -
8. Re: Named qualifier, Weld not inline with spec
pmuir Feb 17, 2010 1:20 PM (in response to chasetec)I fixed one part of this as WELD-435, but not that it is illegal to declare @Named("") at other injection points