Last active
May 20, 2016 11:38
-
-
Save chkal/09fc83002edc57da64e4b7e49b201489 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some interface | |
public interface Plugin { | |
// ... | |
} | |
// standard bean | |
public class FirstPlugin implements Plugin { | |
// ... | |
} | |
// alternative which is enabled via beans.xml | |
@Alternative | |
public class SecondPlugin implements Plugin { | |
// ... | |
} | |
// QUESTION: What is the result of calling this? | |
Set<Beans> result = CDI.current().getBeanManager().getBeans(Plugin.class); | |
// My interpretation of CDI 2.0.EDR1: It returns both FirstPlugin and SecondPlugin | |
// In CDI 1.0 days OWB returned only SecondPlugin (https://issues.apache.org/jira/browse/OWB-658) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment