[ 
https://issues.apache.org/jira/browse/OWB-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115338#comment-13115338
 ] 

Arne Limburg commented on OWB-619:
----------------------------------

This is another point where the specified behavior is not obvious to the user. 
This means, that a user cannot predict, if getBeans(Bla.class, newLiteral) will 
work or not, since at that point he/she cannot know if there exists such 
injection point.

Dynamic creation of that bean would be the better solution here, imho. But I 
guess I have to raise a spec issue for this. At least it should be specified 
that the @New literal is forbitten in general as parameter for getBeans(...)
                
> @New beans must only exist if there is at least one injection point for them 
> -----------------------------------------------------------------------------
>
>                 Key: OWB-619
>                 URL: https://issues.apache.org/jira/browse/OWB-619
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.1.2
>
>
> spec section 3.12 @New defines
> >For each managed bean, and for each session bean, a second bean exists which 
> >....
> ...
> > is enabled, in the sense of Section 5.1.2, "Enabled and disabled beans", if 
> > and only if some other enabled bean has an injection point with the 
> > qualifier @New(X.class) where X is the bean class.
> Which means that we dont need to create a NewBean for each and every bean, 
> but only for ones which gets used in an InjectionPoint somewhere!
> This can massively reduce the amount of needed beans and the mem consumption 
> of OWB

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to