1 Reply Latest reply on Jun 5, 2003 9:44 AM by Jon Barnett

    problem in connection pooling [JNDI name not bound]

    suncy Newbie

      I'm using jboss 3.0 and postgresql 7.x. I tried 2 implement connection pooling . My JNDI name is postgreDS. I am getting the following error

      org.apache.jasper.JasperException: PostgresDS not bound
      I tried to establish connection using the following code
      in my JSP file

      Connection conn= null;
      InitialContext ctx = new InitialContext();
      javax.sql.DataSource ref1 (javax.sql.DataSource) ctx.lookup("java:comp/env/PostgresDS");
      conn = ref1.getConnection();
      Statement stmt =conn.createStatement();
      ResultSet rset=stmt.executeQuery(sql);

      I have taken the configuration file for postgresql from the following path : jboss/docs/examples/jca and
      deployed in default directory.

      I configured the postgres-ds.xml file as below




      I am looking forward for suggestions.