<div dir="ltr">Hi all<div><br></div><div>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?</div><div><br></div><div>
I have an interface: </div><div><br></div><div>public interface Handler<? extends Foo> { ... }</div><div><br></div><div>and then I have two implementations</div><div><br></div><div>public class FarlowHandler implements Handler<Farlow> { .. }</div>
<div><br></div><div>public class BagelHandler implements Handler<Bagel> { ... }</div><div><br></div><div>Is it expected that I should be able to inject references to these by doing:</div><div><br></div><div>@Inject</div>
<div>private Handler<Farlow> fHandler;</div><div><br></div><div>@Inject</div><div>private Handler<Bagel> bHandler;</div><div><br></div><div>? Is there any expected difference when using EJBs?</div><div><br></div>
<div>John</div></div>