java:comp/env/

Discussions

EJB design: java:comp/env/

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

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

    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 ]

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

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

    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.demoPool=demoPool

    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 weblogic.properties file.