Thanks Eric! But with Tomcat 4.0.x I don't have things like MaxActive, MinIdle and other parameters... 4.0 documentation doesn't tell anything about this.
It seems to me that I have to migrate to 4.1.x to use the pool and such parameters. Am I right? L.C. "Roberts, Eric" Per: "Tomcat Users List" <[EMAIL PROTECTED]> <Eric.Roberts@ Cc: one.at> Oggetto: RE: Tomcat 4.0.x JDBC connection pooling 16/01/2003 17.33 Per favore, rispondere a "Tomcat Users List" Hi Luca, The pool is established in the definition of the resource jdbc/EmployeeDB - where things like MaxActive, MinIdle and other parameters determine how the pool behaves. At startup the pool will connect the MinIdle connections to the DB - a new connection will then only be established if that number are already in use. It is good practice to always close connections, as otherwise you become dependent on parameters like RemoveAbandoned and RemoveAbandoned timeout. All of this is discussed in the JNDI Datasource HOWTO in the documention : -) -----Original Message----- From: Luca Cremonini [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 16. Jänner 2003 17:17 To: [EMAIL PROTECTED] Subject: Tomcat 4.0.x JDBC connection pooling I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online documentation (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html ): ----------------------------------------------- // Obtain our environment naming context Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); // Look up our data source DataSource ds = (DataSource) envCtx.lookup("jdbc/EmployeeDB"); // Allocate and use a connection from the pool Connection conn = ds.getConnection(); ... use this connection to access the database ... conn.close(); ----------------------------------------------- I searched the mailing list and the web, but coudn't find answer to these questions: - When I call ds.getConnection(); am I getting a connection from a pool or opening a NEW connection every time? - If there's a pool why do I have to close the connection with conn.close(); instead of releasing it to the pool? - What are the improvement in Tomcat 1.1.x about JDBC connection pooling? -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>