This discussion is archived
0 Replies Latest reply: Jun 27, 2012 10:45 PM by 801933 RSS

how to set datasource under jndi nane java:comp/env/jdbc

801933 Newbie
Currently Being Moderated
JNDI Name - Enter the JNDI path to where this JDBC data source will be bound. Applications look up the data source on the JNDI tree by this name when reserving a connection.

in weblogic, if I enter jdbc/test in datsource > jndi name, then in application, I need lookup with
but not

but if I want the application to lookup the datasource with
how should I set it?

and in fact, I always heard InitialContext.lookup("jdbc/test") is global jndi name and "java:comp/env/jdbc/test" is local JNDI name, but what is the difference in fact?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points