Skip to content

Instantly share code, notes, and snippets.

@jamiecurran
Created May 2, 2013 14:41
Show Gist options
  • Save jamiecurran/5502667 to your computer and use it in GitHub Desktop.
Save jamiecurran/5502667 to your computer and use it in GitHub Desktop.
BoneCP Spring confg
<bean class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy" id="dataSource">
<constructor-arg name="targetDataSource" ref="boneCPDataSource"/>
</bean>
<bean class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close" id="boneCPDataSource">
<property name="driverClass" value="${database.driverClassName}"/>
<property name="jdbcUrl" value="${database.url}"/>
<property name="username" value="${database.username}"/>
<property name="password" value="${database.password}"/>
<property name="maxConnectionsPerPartition" value="30"/>
<property name="minConnectionsPerPartition" value="5"/>
<property name="partitionCount" value="3"/>
<property name="acquireIncrement" value="5"/>
<property name="statementsCacheSize" value="100"/>
<property name="releaseHelperThreads" value="3"/>
<property name="statisticsEnabled" value="true"/>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment