Created
December 11, 2012 09:36
-
-
Save iezg/4257331 to your computer and use it in GitHub Desktop.
c3p0 configuration inside app's context
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Context antiJARLocking="true" path="/"> | |
<Resource | |
name="jdbc/sample" | |
auth="Container" | |
driverClass="com.mysql.jdbc.Driver" | |
jdbcUrl="jdbc:mysql://localhost:3306/yourdbname" | |
user="your_user" | |
password="your_password" | |
factory="org.apache.naming.factory.BeanFactory" | |
type="com.mchange.v2.c3p0.ComboPooledDataSource" | |
maxPoolSize="100" | |
minPoolSize="10" | |
acquireIncrement="3" | |
acquireRetryAttempts = "0" | |
acquireRetryDelay = "3000" | |
breakAfterAcquireFailure = "false" | |
maxConnectionAge = "60" | |
maxIdleTime = "30" | |
maxIdleTimeExcessConnections = "10" | |
idleConnectionTestPeriod = "15" | |
testConnectionOnCheckout = "true" | |
preferredTestQuery = "SELECT 1" | |
debugUnreturnedConnectionStackTraces = "true" | |
autoCommitOnClose="true" | |
/> | |
</Context> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment