Tomcat/MySql DataSource - Connection Pool does not seem to get initialized
Posted by: Ken Jenkins
Date: January 18, 2005 01:57PM

I am using Connector/J 3.1.6, Tomcat 5, and MySql 4.1. I have successfully set up MySql as a JNDI Datasource as described in the Tomcat HOWTO located at:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example

Depending on what documentation you believe, there are a number of standard properties the JDBC Datasource accepts for configuring the connection pooling. Of particular interest to me are "initialPoolSize" and "minPoolSize"...or, as other documents refer to them.... "initialSize" and "minIdle". I have tried setting all of these properties in my Tomcat <ResourceParams> definition for the DataSource, but when I run the MySql Administrator and view the number of server connections, the number of connections that are created is never more than I have explicitly created myself...1 for each connection.

It makes me wonder if connection pooling is really happening here. If I set 10 as the initial and minimum pool size, it seems that 10 connections should initially get connected no matter how many I am using.

The DataSource does seem to be using other ResourceParams such as connectionProperties, username, password, etc.

Any ideas on why the connection pool is not creating the specified number of connections?

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Tomcat/MySql DataSource - Connection Pool does not seem to get initialized
January 18, 2005 01:57PM
January 21, 2005 04:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.