-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
3.0.4.Final
-
None
I have an ear deployment containing an extracted war, an extracted ejb and shared librairies under lib/. In the war I have an implementation of an HttpAuthenticationMechanism that is looked up by soteria using the following construct:
CDI.current().select(HttpAuthenticationMechanism.class).get()
I noticed that the BeanManager instance returned by `CDI.current().getBeanManager()` is not consistent across redeployments, returning sometimes the bean manager of the war module, sometimes one of the ejb module, and sometimes one of a jar library, randomly. This prevents the above class to be resolved correctly.
On the other hand, performing a JNDI lookpup to resolve the BeanManager at that point would systematically return that of the war, allowing the HttpAuthenticationMechanism instance to be resolved.
This issue is also tracked on the soteria side there: https://github.com/eclipse-ee4j/soteria/issues/200.