Created
August 27, 2014 05:44
-
-
Save playerjamesbattleground/cd124243286dd4c98c74 to your computer and use it in GitHub Desktop.
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
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> | |
<!-- access --> | |
<property name="driverClass" value="${db.driverclass}" /> | |
<property name="jdbcUrl" value="${db.url}" /> | |
<property name="user" value="${db.user}" /> | |
<property name="password" value="${db.password}" /> | |
<!-- pool sizing --> | |
<property name="initialPoolSize" value="3" /> | |
<property name="minPoolSize" value="6" /> | |
<property name="maxPoolSize" value="25" /> | |
<property name="acquireIncrement" value="3" /> | |
<property name="maxStatements" value="0" /> | |
<!-- retries --> | |
<property name="acquireRetryAttempts" value="30" /> | |
<property name="acquireRetryDelay" value="1000" /> <!-- 1s --> | |
<property name="breakAfterAcquireFailure" value="false" /> | |
<!-- refreshing connections --> | |
<property name="maxIdleTime" value="180" /> <!-- 3min --> | |
<property name="maxConnectionAge" value="10" /> <!-- 1h --> | |
<!-- timeouts and testing --> | |
<property name="checkoutTimeout" value="5000" /> <!-- 5s --> | |
<property name="idleConnectionTestPeriod" value="60" /> <!-- 60 --> | |
<property name="testConnectionOnCheckout" value="true" /> | |
<property name="preferredTestQuery" value="SELECT 1" /> | |
<property name="testConnectionOnCheckin" value="true" /> | |
</bean> |
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
# DB settings | |
# ~~~~~~~~~~~~ | |
# H2 | |
db.driver = org.h2.Driver | |
db.url = jdbc:h2:mem:myDBname | |
db.user = sa | |
db.password = | |
# MySQL | |
#db.driver = com.mysql.jdbc.Driver | |
#db.url = jdbc:mysql://localhost:3306/myDBname | |
#db.user = mysql | |
#db.password = mysql | |
# PostegrSQL | |
#db.driver = org.postgresql.Driver | |
#db.url = jdbc:postgresql://localhost:5432/myDBname?searchpath=public | |
#db.user = postgresql | |
#db.password = postgresql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment