X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fcdi%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fcdi%2FBeanManagerLookup.java;h=8d9ab46d4c252ab11675e706db2e2f0c52c445c3;hb=7f6f93925c439bf3ddaf5aa29780a1009a62e36e;hp=afa42332afe1c016ac7ef40905510b719e8e3c07;hpb=f6eb1a70ec5bb7a65a018dd5756b110bbd3aebb9;p=utils diff --git a/support/cdi/src/main/java/org/wamblee/cdi/BeanManagerLookup.java b/support/cdi/src/main/java/org/wamblee/cdi/BeanManagerLookup.java index afa42332..8d9ab46d 100644 --- a/support/cdi/src/main/java/org/wamblee/cdi/BeanManagerLookup.java +++ b/support/cdi/src/main/java/org/wamblee/cdi/BeanManagerLookup.java @@ -23,11 +23,15 @@ import javax.naming.NamingException; /** * Class that encapsulates beanmanager lookup in a way so that the lookup can be - * explicitly overriden (e.g. for unit test). + * explicitly overriden (for instance for unit test). * * In case no bean manager is found the beanmanager is set to null and the * problem is logged. * + * This class does caching of the obtained reference to the bean manager. + * As a result, it is necessary to call {@link #setBeanManager(BeanManager)} + * in the setup phase of unit tests to make sure that the lookup is done again. + * * @author Erik Brakkee */ public class BeanManagerLookup {