How can I use JSR-299 CDI to inject (not annotated) beans from external libraries?
Examples:
Interface X and its implementations come from a third party lib. How can I decide which implementation to use?
class A {
@Inject
private X x;
}
What if I had several classes using the X interface but different implementations?
class A {
@Inject
private X x; // should be XDefaultImpl
}
class B {
@Inject
private X x; // should be XSpecialImpl
}