title: Why is it impossible to inject generic classes?
body: <p>I have a generic abstract template class. I thought if I create type-specific Producers, I could inject some DAO service directly in the generic class. But I can't.</p>
  
  <p>Why? And how could I work around this?</p>
  
  <pre><code>abstract class MyView&lt;T&gt; {
      @Inject
      MyDao&lt;T&gt; dao;
  
      //some more template methods that make use of the dao
      void someMethod() {
          dao.use();
      }
  }
  
  class CustomerView extends MyView&lt;Customer&gt; {
      //javax.enterprise.inject.AmbiguousResolutionException: Ambigious resolution
  }
  
  
  class DaoManager {
      @Produces
      MyDao&lt;Customer&gt; getDaoCustomer() {
          return DaoFactory.make(Customer.class);
      }
  
      @Produces
      MyDao&lt;Product&gt; getDaoProduct() {
          return DaoFactory.make(Product.class);
      }
  }
  </code></pre>
  
  <p>When I inject eg a <code>@Inject MyDao&lt;Customer&gt; dao;</code> it works perfectly. But not with generics...</p>