Hi<div><br></div><div>i think @EJB Foo&lt;Bar&gt; ignores Bar (or at least the ejb spec doesnt define it)</div><div><br clear="all"><div><div><i>Romain Manni-Bucau</i></div><div><i>Twitter: <a href="https://twitter.com/rmannibucau" target="_blank">@rmannibucau</a></i></div>

<div><i>Blog: </i><a href="http://rmannibucau.wordpress.com/" target="_blank"><i>http://rmannibucau.wordpress.com/</i></a></div><div><i>LinkedIn: </i><font color="#0000ee"><i><u><a href="http://fr.linkedin.com/in/rmannibucau" target="_blank">http://fr.linkedin.com/in/rmannibucau</a></u></i></font></div>

<div><i><span style="background-color:rgb(255,255,255)">Github: </span><a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a></i></div><div><br></div></div>
<br><br><div class="gmail_quote">2013/7/2 Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5"><br>
On 2 Jul 2013, at 11:28, John D. Ament &lt;<a href="mailto:john.d.ament@gmail.com">john.d.ament@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi all<br>
&gt;<br>
&gt; In section 4.2 of the CDI spec (both 1.0 and 1.1) there are references to injection around generic types.  I was wondering if someone could clarify this case?<br>
&gt;<br>
&gt; I have an interface:<br>
&gt;<br>
&gt; public interface Handler&lt;? extends Foo&gt; { ... }<br>
&gt;<br>
&gt; and then I have two implementations<br>
&gt;<br>
&gt; public class FarlowHandler implements Handler&lt;Farlow&gt; { .. }<br>
&gt;<br>
&gt; public class BagelHandler implements Handler&lt;Bagel&gt; { ... }<br>
&gt;<br>
&gt; Is it expected that I should be able to inject references to these by doing:<br>
&gt;<br>
&gt; @Inject<br>
&gt; private Handler&lt;Farlow&gt; fHandler;<br>
&gt;<br>
&gt; @Inject<br>
&gt; private Handler&lt;Bagel&gt; bHandler;<br>
<br>
</div></div>Yes.<br>
<div class="im"><br>
&gt;<br>
&gt; ?  Is there any expected difference when using EJBs?<br>
<br>
</div>Assuming the interface is part of the local client view of the EJB, then no. Obviously, if EJB has any rules around declaring generic types in local interfaces, then you need to respect those (IIRC, it doesn&#39;t).<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" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
</blockquote></div><br></div>