They are very different.The only portable way to lookup any dependencies , e.g. ejb references, from
a Java EE component is to do it through the component's private component namespace, also known
as java:comp/env.*Any* access of a global JNDI namespace is not portable. The specs make no
mention of a global JNDI namespace, so accessing one is by definition accessing something whose
behavior is not defined.We have a presentation that covers some of these topics available at :
https://glassfish.dev.java.net/javaee5/ejb/compdependencies_xmlforum_nov15.pdf
--ken