I created a DB Connection Pool with net.sourceforge.jtds.jdbc.Driver,
org.apache.commons.dbcp.BasicDataSourceFactory

In java code, I use the connection as:
    ......
    Connection con = null;
    try {
      Context ctx = new InitialContext();
      DataSource ds = (DataSource) ctx.lookup(
            "java:comp/env/jdbc/DirectSQL");
      con = ds.getConnection();
       ....
      con.close();

"jdbc/DirectSQL" is found, and The databse get connected. I thought after I
close the connection, Tomcat handles the "con" in the pool.

Somebody says that I have not used a DB connection pool. It is only a
connection I get. Connection from pool should use poolXXXX or XXXXpool.

So I start to doubter. Please confirm or teach me how to use Connection
pool.

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to