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

Roberto Chinnici Roberto.Chinnici at Sun.COM
Mon Oct 19 20:24:32 EDT 2009


Gavin King wrote:
> On Mon, Oct 19, 2009 at 7:55 PM, Roberto Chinnici
> <Roberto.Chinnici at sun.com> wrote:
>
>   
>> But that's the issue, because it triggers scanning of all application
>> classes.
>>     
>
> No it doesn't! Thats the whole point!
>
> Pete of course has implemented this without scanning of non-bean
> deployment archives.
>   

Scanning for @Resource at deployment time, not scanning for beans as such.

>> On top of that, it's speculative scanning. If the bean isn't
>> discovered until we find a use of the "second bean" (with @New), should we
>> tentatively retain as valid all the resources the bean declares, during
>> scanning, only to discard them if it turns out the bean does not actually
>> exist (i.e. there is no usage with @New)? I'm also starting to wonder where
>> this process ends, given that the SPI lets the application register new
>> beans at runtime. Does that mean that all resources declared anywhere are
>> valid?
>>     
>
> Nononononono!
>
> The 299 impl creates the Bean object for the "second bean"
> (unfortunate term) when it notices the injection point with @New.
>   

But surely it must create the bean for the first bean too, in that it'll 
show up in the metamodel.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20091019/7c4ec302/attachment.html 


More information about the weld-dev mailing list