title: What's the relation between CDI and JNDI service?
body: <p>As far as I understand "pre-CDI" EJB and resources injection solutions (<code>@EJB</code>, <code>@Resource</code> and others, to be clear) use the JNDI service to locate objects "known" to the container by virtue of being JNDI registered, and then inject them where requested.</p>
  
  <p>CDI, instead, relies on <code>bean-discovery-mode</code> parameter (<code>ALL</code> or <code>ANNOTATED</code>) to discover beans that need to be managed. But how is this process actually performed? A runtime scan of... what? Is JNDI not involved at all? </p>
  
  <p>I have the feeling I'm getting something wrong about the whole mechanism...</p>