<p dir="ltr"><br>
Le 20 mars 2016 22:21, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br>
&gt;<br>
&gt; But the Context only gets the information from the Bean&lt;T&gt;. 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>
&gt; Not quite sure how you imagine this should work.<br>
&gt;</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">&gt;<br>
&gt; LieGrue,<br>
&gt; strub<br>
&gt;</p>
<p dir="ltr">Agree with Arjan we need a context.run(Runnable/Supplier) to have something user friendly.</p>
<p dir="ltr">&gt;<br>
&gt;<br>
&gt; On Sunday, 20 March 2016, 22:13, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt; &gt;Le 20 mars 2016 22:03, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Sorry for my brevity. Was on a cellphone only.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; My point is: Context#get(Bean&lt;T&gt;) and Bean&lt;T&gt; only has getScope() which looks like<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; public Class&lt;? extends Annotation&gt; getScope();<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thus having something like<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; @RequestScoped(allowMultithreads=true)<br>
&gt; &gt;&gt; public class BlaBlaController {..}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; would get represented by a Bean&lt;BlaBlaController&gt; which could only return RequestScoped.class.<br>
&gt; &gt;&gt; There is simply no way to return the &quot;allowMultithreads=true&quot; information somewhere as we only deal with Classes.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The same applies to BeanManager#getContext():<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; public Context getContext(Class&lt;? extends Annotation&gt; scope);<br>
&gt; &gt;&gt;<br>
&gt; &gt;Not related to me since the context should handle it and not the bean manager.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; No Annotation but Class, you see?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; -&gt; Currently there is no way to evaluate an additional attribute on a scope annotation.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; And thus section 2.4.2 of the CDI specification also clearly states<br>
&gt; &gt;&gt; &quot;A scope type must not have any attributes. If a scope type has attributes non-portable behavior results.&quot;<br>
&gt; &gt;&gt;<br>
&gt; &gt;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>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;&gt; roger?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; LieGrue,<br>
&gt; &gt;&gt; strub<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Sunday, 20 March 2016, 21:12, Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt; wrote:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;Le 20 mars 2016 21:07, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt; See Bean#getScope() and BeanManager#getContext()<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt; Just uses Class and no Annotation instance.<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;That&#39;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>
&gt; &gt;&gt; &gt;Would also break the Annotated contravt if true.<br>
&gt; &gt;&gt; &gt;&gt; Lgm<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; cdi-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; 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>
&gt; &gt;<br>
&gt; &gt;<br>
</p>