itVincent Blog - Java Working Fun!

posts - 117, comments - 181, trackbacks - 0, articles - 12
BoneCP 是一个开源的快速的 JDBC 连接池

Highly scalable, fast connection pool
Callback (hook interceptor) mechanisms on a change of connection state.
Partitioning capability to increase performance
Allows direct access to a connection
Automatic resizing of pool
Statement caching support
Support for obtaining a connection asynchronously (by returning a Future<Connection>)
Release helper threads to release a connection in an asynchronous fashion for higher performance.
Easy mechanism to execute a custom statement on each newly obtained connection (initSQL).
Support to switch to a new database at runtime without shutting down an application
Ability to replay any failed transaction automatically (for the case where database/network goes down etc)
JMX support
Lazy initialization capable
Automatic validation of connections (keep-alives etc)
Allow obtaining of new connections via a datasource rather than via a Driver
Datasource/Hibernate support capable
Debugging hooks to highlight the exact place where a connection was obtained but not closed
Debugging support to show stack locations of connections that were closed twice.
Custom pool name support.
100% unit test code coverage (over 100 JUnit tests).
Free, open source and written in 100% pure Java with very extensive and complete Javadocs



   <name>BoneCP Repository</name>


<bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
    <property name="driverClass" value="${jdbc.driverClassName}" />
    <property name="jdbcUrl" value="${jdbc.url}" />
    <property name="username" value="${jdbc.username}"/>
    <property name="password" value="${jdbc.password}"/>