0 Replies Latest reply on Mar 3, 2003 5:16 PM by hormati

    DataSource & JNDI Name

    hormati

      hi
      I have configured my jboss to use a DataSource with oracle database , (java:/oracleDS)
      I write this code in my jsp :

      InitialContext c = new InitialContext();
      DataSource ds = (DataSource)(c.lookup("java:/oracleDS"));

      and this works and I can connect to oracle using this DataSource. but I havent defined anything in my web.xml in <res-ref-name>. I want to know why this works ?
      When I should define <res-ref-name> inside web.xml.