JDBC Connection Pooling in Tomcat Versions
Last updated on MARCH 08, 2017
Applies to:MySQL Connectors - Version 5.1 and later
Information in this document applies to any platform.
Qn1: With Tomcat 7, do I still need to specify the factory attribute and set the value to "org.apache.tomcat.jdbc.pool.DataSourceFactory" in the resource configuration to use the JDBC connection pool rather than using the default dbcp connection pool ( I found the tomcat-jdbc.jar is located under the LIB at default in Tomcat 7)?
Qn2: I have Tomcat 6.0.32 running in production without "the factory attribute" in resource config and no tomcat-jdbc.jar under the LIB. This means I have been using the default dbcp connection pool. According to research, there is a different version of commons DBCPs like 1.X or 2.X from the below link. From this link, it looks like 2.x is quite improved compared to 1.X. Is there any way we can find what version of DBCP connection pool we are using?
Qn3: Instead of upgrading the Tomcat, if I want to use the JDBC connection pool with the current version of Tomcat(6.0.32), is it possible? I think we need to specify the factory attribute and download the tomcat-jdbc.jar to the LIB folder. Here are questions regarding this. I have found there are many version of "tomcat-jdbc.jar" like below. Is there any way we can find the best fit to our current version of Tomcat? The latter the better?
Qn4: The JDBC connection pool has another dependency. That is on tomcat-juli.jar. Because the Tomcat 6.0.32 contain this JAR file, do you think we do not need to upload the latest one if we want to use the JDBC connection pool?
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms