Ambiguos injection for HashMap from producer with CDI
I have the following classes:
public class MyMap extends HashMap {
public MyMap () { }
some more methods...
}
@SessionScoped
public ProducerClass implements Serializable {
@Produces @MyItem HashMap<A,B> produceItems () { }
}
@Named
public ConsumerClass {
@Inject @MyItem HashMap<A,B> property;
}
@Retention(RUNTIME)
public @interface MyItem {
}
I get the error ambiguous injection point at property for MyMap and
HashMap form ConsumerClass.
How can it be ? I thought that the injection class is unique given through
@MyItem annotation.
No comments:
Post a Comment