Posted By

mahome on 05/05/09


Tagged

database java spring DataSource C3P0


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

appx
kubaitis


C3P0 DataSource Config (Connection-Pool)


 / Published in: Java
 

URL: http://www.mchange.com/projects/c3p0/

Tags: C3P0, datasource, spring, database, java

  1. <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
  2. <property name="driverClass" value="${jdbc.driverClassName}"></property>
  3. <property name="jdbcUrl" value="${jdbc.url}"/>
  4. <property name="user" value="${jdbc.username}"/>
  5. <property name="password" value="${jdbc.password}"/>
  6. <property name="initialPoolSize" value="5"></property>
  7. <property name="minPoolSize" value="5"></property>
  8. <property name="maxPoolSize" value="15"/>
  9. <property name="checkoutTimeout" value="1000"/> <!-- Wartezeit auf freie Pool-Connection -->
  10. <property name="maxStatements" value="50"></property>
  11. <property name="automaticTestTable" value="C3P0_TEST_TABLE"></property>
  12. <property name="testConnectionOnCheckin" value="true"></property>
  13. <property name="idleConnectionTestPeriod" value="60"></property> <!-- in Sekunden -->
  14. </bean>

Report this snippet  

You need to login to post a comment.