1 Reply Latest reply on May 14, 2008 7:19 PM by Eric Smith

    Is there is any default Jndi name to use

    Paida Kumar Newbie

      javax.naming.InitialContext newInitialContext= new javax.naming.InitialContext();

      javax.naming.Context ctx=(Context)newInitialContext.lookup("java:comp/env");
      javax.sql.DataSource ds=(javax.sql.DataSource)ctx.lookup("java:MySqlDS");
      java.sql.Connection conn=ds.getConnection();

      is ther is any default ds to get the connetion ref..

      which jndi name I have to use to get the Datasource