<p dir="ltr"><br>
Le 20 mars 2016 22:21, "Mark Struberg" <<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>> a écrit :<br>
><br>
> But the Context only gets the information from the Bean<T>. And that only returns a Class. The Context just has no clue what the parameter for that very impl was. And it also cannot simply ask the Class#getAnnotations() as this would break all Extensions inbetween.<br>
> Not quite sure how you imagine this should work.<br>
></p>
<p dir="ltr">Annotated can be retrieved now and scopes shouldnt be needed before after the validation so sounds good to me.</p>
<p dir="ltr">><br>
> LieGrue,<br>
> strub<br>
></p>
<p dir="ltr">Agree with Arjan we need a context.run(Runnable/Supplier) to have something user friendly.</p>
<p dir="ltr">><br>
><br>
> On Sunday, 20 March 2016, 22:13, Romain Manni-Bucau <<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>> wrote:<br>
> >Le 20 mars 2016 22:03, "Mark Struberg" <<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>> a écrit :<br>
> >><br>
> >><br>
> >><br>
> >> Sorry for my brevity. Was on a cellphone only.<br>
> >><br>
> >><br>
> >> My point is: Context#get(Bean<T>) and Bean<T> only has getScope() which looks like<br>
> >><br>
> >> public Class<? extends Annotation> getScope();<br>
> >><br>
> >> Thus having something like<br>
> >><br>
> >> @RequestScoped(allowMultithreads=true)<br>
> >> public class BlaBlaController {..}<br>
> >><br>
> >> would get represented by a Bean<BlaBlaController> which could only return RequestScoped.class.<br>
> >> There is simply no way to return the "allowMultithreads=true" information somewhere as we only deal with Classes.<br>
> >><br>
> >> The same applies to BeanManager#getContext():<br>
> >><br>
> >> public Context getContext(Class<? extends Annotation> scope);<br>
> >><br>
> >Not related to me since the context should handle it and not the bean manager.<br>
> >><br>
> >> No Annotation but Class, you see?<br>
> >><br>
> >> -> Currently there is no way to evaluate an additional attribute on a scope annotation.<br>
> >><br>
> >><br>
> >> And thus section 2.4.2 of the CDI specification also clearly states<br>
> >> "A scope type must not have any attributes. If a scope type has attributes non-portable behavior results."<br>
> >><br>
> >Nothing we cant change and worde case change the flag to an own annotation and it works which prooves it is not really relevant and it would work.<br>
> ><br>
> ><br>
> >> roger?<br>
> >><br>
> >> LieGrue,<br>
> >> strub<br>
> >><br>
> >><br>
> >><br>
> >><br>
> >> On Sunday, 20 March 2016, 21:12, Romain Manni-Bucau <<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>> wrote:<br>
> >> ><br>
> >> >Le 20 mars 2016 21:07, "Mark Struberg" <<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>> a écrit :<br>
> >> >><br>
> >> >> See Bean#getScope() and BeanManager#getContext()<br>
> >> >><br>
> >> >> Just uses Class and no Annotation instance.<br>
> >> >><br>
> >> >That's ok I think. Since 1.2 you can get meta from any bean and find it if needee but i most of cases the context will see the bean and will not need it.<br>
> >> >Would also break the Annotated contravt if true.<br>
> >> >> Lgm<br>
> >> >><br>
> >> >><br>
> >><br>
> >> _______________________________________________<br>
> >> cdi-dev mailing list<br>
> >> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
> >> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
> >><br>
> >> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
> ><br>
> ><br>
</p>