Here's a quick demonstration of how to create a Tomcat connection pool (database connection pool) using the Tomcat DBCP library.
I'm not going to go into a detailed explanation here of how Tomcat DBCP works, other than to say that it works for me, and I've tried to include everything here that you'll need to implement your own Tomcat DBCP database connection pool in your web applications.