[weld-dev] [jsr-299-eg] Updated spec with @BeanTypes and clarification of @New

Roberto Chinnici Roberto.Chinnici at Sun.COM
Mon Oct 19 20:17:10 EDT 2009


Jason T. Greene wrote:
> Roberto Chinnici wrote:
>> Gavin King wrote:
>>>
>>> You have provided no argumentation in support of "should not".
>>>
>>> Whereas I have provided a Very Good Reason why they *should* be
>>> injectable, with limited semantics, using the special @New annotation.
>>>   
>>
>> OK, let me ask you a simpler question: if I have a web module, say, 
>> without a beans.xml
>> descriptor, can I lookup a BeanManager in JNDI under 
>> java:comp/BeanManager? Currently
>> the platform spec says you can't.
>>
>
> Are we all talking about the same thing? Earlier you mentioned use the 
> term "bean" instead of "class". Are you having an issue with the 
> terminology, or is it the capability you have a problem with?
>
> To be clear, when you say @New blah, the resulting bean instance 
> belongs to the beanmanager associated with the injection point. The 
> "first" instance, if it even exists, is not touched in any way by 299. 
> So all we are talking about is a way to reference any class that fits 
> the rules of a 299 bean. In other words, anything which can be a 299 
> bean, has a "new" instance implicitly created. The source of that bean 
> is not really important, other than it has to be visible to the 
> classloader.

My issue is that I need to know at deployment time what components exist 
in the application, so I can do the right thing wrt @Resource and friends.

The terminology is important because bean implies component. If you 
called "a class that fits the rules of a 299 bean" a pre-bean, for 
example, then I think I could reasonably excuse the deployment tool from 
having to look at them.



More information about the weld-dev mailing list