<div dir="ltr"><div>Hi,</div><div><br></div><div>I noticed a difference between using CDI.current() and initialContext.lookup(&quot;java:comp/BeanManager&quot;) when called from within a container jar (e.g. Mojarra) in a modular application server (e.g. JBoss/WildFly).</div><div><br></div><div>With CDI.current() the bean manager I get when called from within Mojarra is:</div><div><br></div><div>&quot;Weld BeanManager for com.sun.jsf-impl:main.additionalClasses [bean count=44]&quot;<br></div><div><br></div><div><br></div><div>With initialContext.lookup(&quot;java:comp/BeanManager&quot;) it&#39;s:</div><div><br></div><div>Weld BeanManager for example_app.ear/example_app.war/WEB-INF/classes [bean count=97]<br></div><div><br></div><div>Where &quot;example_app&quot; is an EAR application that I used for testing.<br></div><div><br></div><div>I wonder, is this difference intended and did I overlook something, or is it an unfortunate consequence of something? An additional problem is that not all (modular) application servers act the same here. E.g. in GlassFish/Payara I get the application bean manager in both cases.</div><div><br></div><div>Kind regards,</div><div>Arjan Tijms</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>