This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
The EJB specification has a bunch of annotations for injecting Java EE resources, services, and EJB references into
your bean classes. Some application servers or applications like to use JNDI as a global registry for configuration or for
non-Java EE services. Unfortunately, the specification defines no way to inject something directly from global JNDI into your beans.
With respect to the above statement(s) I had a train of thoughts which led me to the question,
What is the fundamental difference between "java:/comp/env" and "Global JNDI". Aren't they both contexts within the same JVM?
How are they different?
I realize that "Global JNDI" could be anything(as in any context) and I have purposely left it undefined in the question here. I am of course
referring to EJB lookup and resource lookup. The other question in my mind is,
Can I lookup one bean from another by using the "java:comp/env" context? What are the various conditions under which I can or cannot