/ Published in: Java
Tags: C3P0, datasource, spring, database, java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="${jdbc.driverClassName}"></property> <property name="jdbcUrl" value="${jdbc.url}"/> <property name="user" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="initialPoolSize" value="5"></property> <property name="minPoolSize" value="5"></property> <property name="maxPoolSize" value="15"/> <property name="maxStatements" value="50"></property> <property name="automaticTestTable" value="C3P0_TEST_TABLE"></property> <property name="testConnectionOnCheckin" value="true"></property> <property name="idleConnectionTestPeriod" value="60"></property> <!-- in Sekunden --> </bean>
URL: http://www.mchange.com/projects/c3p0/