Table of Contents



  • 1.0.2 (J2EE 1.3)
  • 1.1 (J2EE 1.4+)


  • "java:" — a JNDI namespace global to all components but not accessible by remote clients (think, "local JVM").
  • "java:comp" — a JNDI namespace private to the deployed component (EJB or web application). That is each component gets a private instance of one of these. You won't see the full path in entries in the deployment descriptors (ejb-jar.xml and web.xml) because it is implied.
    • In general J2EE parlance, this is referred to as the Application Component Environment (no acronym);
    • in JBoss, they call this the Enterprise Naming Context (ENC).
    • "java:comp/env" — so-called "environment" entries. Just like OS environment variables.
      • set as "env-entry" elements in the various deployment descriptors (e.g. web.xml); basically externalized values (all the basic primitive types are supported)
      • set as "resource-ref" elements, so-called "resource manager connection factory" references are set here as well.1
        • the J2EE spec recommends prefixing such references based on type: "jdbc", "jms", "mail" and "url" (the first two are most common).
  • (any other name) — a global namespace accessible both on JVM and by remote clients.



Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License