The following links provide you with full Java projects demonstrating the use and configuration of BoneCP in a Spring framework (+ Hibernate) environment. The example projects read/write random data to two tables and are based on MySQL but can be adapted to work for any database.
You will need Apache Maven to automatically include the required jar files into your classpath. Alternatively you may add the required JAR files manually (including the persistence library available here). These examples have been developed via Eclipse.