jQuery in Action, 2nd edition*
The moose likes EJB and other Java EE Technologies and the fly likes Injection in CDI and inheritance. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Injection in CDI and inheritance." Watch "Injection in CDI and inheritance." New topic
Author

Injection in CDI and inheritance.

Bono Vox
Greenhorn

Joined: May 24, 2012
Posts: 6
Hi,

I don't understand one thing.

I have two classes A and B.



Why when I inject in another class :



I become cdi ambiguous dependencies exception.

When I change



to



than no exception in deployment is thrown.


What should I do to inject A type.

Please help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Injection in CDI and inheritance.
 
Similar Threads
Generate or override getter method
CDI injection across jars
is EJBContext threadsafe?
NullPointer when working with Events in CDI
Customizing EntityManager injection for multi-tenancy