I fail to find any reference to or explanation of the meaning of the java:comp/env as a JNDI environment naming context. Would anyone be able to give me some hint? Even the J2EE tutorial just starts using the phrase without much explanation.
Thanks in advance
as far as I know it's just a shorthand for the environment defined in the deployment descriptor. I think it's better described in the EJB spec.
Chapter 20 of the EJB 2.0 Spec.
Its Just a container Specific JNDI initialization
java:comp/env is just a JNDI context that J2EE reserves for read only state that can be used to configure the deploytime behaviour of beans and as a base context for indirect references to J2EE resources such as JMS destinations and ejb homes.
Anything defined in the deployment descriptor environment is available via this context.
It is not updateable.
When implementing your J2EE code, introduce am envLookUp method that hides this context from clients.