0 Replies Latest reply: Jun 28, 2012 12:45 AM by 801933 RSS

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

    801933
      >
      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
      InitialContext.lookup("jdbc/test")
      but not
      InitialContext.lookup("java:comp/env/jdbc/test");

      but if I want the application to lookup the datasource with
      InitialContext.lookup("java:comp/env/jdbc/test");
      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?