EJB design: java:comp/env/

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

    can somebody explain me the significance of this path"java:comp/env/" during JNDI lookup...
    what does this mean?

    Threaded Messages (4)

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

    Hi Sus-

    java:comp/env is called the NamingEnvironment for EJBs. It's merely a naming scheme that bean developers and application server vendors must adhere to for locating resources, resource managers, other EJB references, environment variables, and resource manager connection factory references (yes, this is their technical term). These items that an EJB may want to use are not actually bound into java:comp/env, but an application server has to map requests for java:comp/env to the actual location that these items are bound to. By standardizing on java:comp/env, all EJBs are now forced to be similar in how they locate resources that they require.
  3. java:comp/env/[ Go to top ]

    thanks a lot for your reply.
    Can u/some body throw more light on this???? I didn't understand this very well....
  4. java:comp/env/[ Go to top ]

    Following up on the previous question. Let's say I have an entry in the file like the following:


    What will be the correct JNDI lookup string when I want to get the DataSource from JNDI? Is it java:comp/env/jdbc/demoPool, or java:comp/env/jdbc/jts/demoPool?
  5. java:comp/env/[ Go to top ]

    Answering my own question --- you need to create an reference entry in the deployment descriptor, and then map this entry to the one in the file.