JNDI names and java:com/env. EASY ONE !

Discussions

General J2EE: JNDI names and java:com/env. EASY ONE !

  1. Can someone please tell me the difference between using

    * java:comp/env naming subcontext
    * direct JNDI names ?


    What is java:comp/env naming convention anyway ?
    Is this only accessible for EJB, etc running inside a container that the resource name is defined ?
  2. Can someone please tell me the difference between using* java:comp/env naming subcontext * direct JNDI names ?What is java:comp/env naming convention anyway ?Is this only accessible for EJB, etc running inside a container that the resource name is defined ?
    According to me both are same.I have read in Oreily book that java:comp/env is known as environmental naming context. These are just the two ways for accessing the EJB's home interface.
    Good subject to have discussion on.
    Thanks
    Amit