Created
March 26, 2013 22:14
-
-
Save friek/5249813 to your computer and use it in GitHub Desktop.
Tomcat JNDI configuration for mysql and C3P0 pooling.
Also runs an anti-idle query to prevent MySQL from disconnecting idle connections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Resource acquireIncrement="1" auth="Container" driverClass="com.mysql.jdbc.Driver" | |
| factory="org.apache.naming.factory.BeanFactory" | |
| idleConnectionTestPeriod="600" initialPoolSize="2" | |
| jdbcUrl="jdbc:mysql://<server>:3306/<dbname>?characterEncoding=UTF-8" | |
| maxIdleTime="300" maxPoolSize="3" minPoolSize="1" name="jdbc/<resource_name>" | |
| password="<password>" preferredTestQuery="SELECT 1" | |
| testConnectionOnCheckout="true" type="com.mchange.v2.c3p0.ComboPooledDataSource" | |
| user="<username>" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment