<div dir="ltr">Hi Martin,<div><br></div><div class="gmail_extra"><div class="gmail_quote">
2014/2/4 Martin Kouba <span dir="ltr">&lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Hi Gunnar,<br>
<br>
I believe it is required.<br>
<br>
See the spec section 11.1 The Bean interface:<br>
&quot;getTypes(), getQualifiers(), getScope(), getName() and getStereotypes()<br>
must return the bean types, qualifiers, scope type, bean name and<br>
stereotypes of the bean, as defined in Chapter 2&quot;<br>
<br>
I think the sentence you&#39;re referencing is rather about class-based<br>
beans, not custom beans.<br></blockquote><div><br></div><div>Yes, that&#39;s the question.</div><div><br></div><div>It doesn&#39;t explicitly say it&#39;s about class-based beans only, so it can be perceived as applying to custom beans as well. Then I&#39;d understand the &quot;as defined in Chapter 2&quot; from section 11.1 as &quot;it&#39;s not required to explicitly return @Any&quot;.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
But it&#39;s not very clear.<br></blockquote><div><br></div><div>Right, some clarification would be nice. In my particular case I&#39;ll just add a literal for @Any, but it&#39;s easy to forget to do so when writing a PE, so it might be useful to require a CDI implementation to automatically add that qualifier for custom beans if missing.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
M<br>
<br>
<br>
Dne 4.2.2014 09:54, Gunnar Morling napsal(a):<br>
<div><div>&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m registering a custom Bean implementation using a portable extension.<br>
&gt; Injection of this bean using the @Any qualifier fails unless I<br>
&gt; explicitly add this qualifier in the getQualifiers() implementation of<br>
&gt; my bean.<br>
&gt;<br>
&gt; Now the spec says in 2.3.1:<br>
&gt;<br>
&gt;     &quot;Every bean has the built-in qualifier @Any, even if it does not<br>
&gt; explicitly declare this qualifier [...]&quot;<br>
&gt;<br>
&gt; Based on that, I had expected that I&#39;m not required to add this<br>
&gt; qualifier to my custom bean implementation. Or am I misinterpreting the<br>
&gt; spec here?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; --Gunnar<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
</blockquote></div><br></div></div>