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


      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://localhost/Mail</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>Administrator</user-name>
      sam

      <min-pool-size>5</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>

      </local-tx-datasource>




      I am looking forward for suggestions.