I was trying to get connection pooling in JDBC with Postgres going and looked into using the Commons DBCP and Pool libraries. 

The problem is that the examples on how to get started dont refer to the released versions of the libraries but instead refer to trunk and the current refactoring. 

Thus: the basic “PoolingDataSourceExample.java” doesnt work as advertised, based on the current release of commons-dpcp-1.4.jar and commons-pool-1.5.6.jar.

I was able to create my connection pool by using code like so: