meaning of java:comp/env

Discussions

EJB programming & troubleshooting: meaning of java:comp/env

  1. meaning of java:comp/env (4 messages)

    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
    David

    Threaded Messages (4)

  2. meaning of java:comp/env[ Go to top ]

    Hi,
    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.

    Regards
    Curt Johansson
  3. meaning of java:comp/env[ Go to top ]

    Chapter 20 of the EJB 2.0 Spec.

    Bill
  4. meaning of java:comp/env[ Go to top ]

    Its Just a container Specific JNDI initialization
  5. meaning of java:comp/env[ Go to top ]

    RTFM

    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.