Documentation is sparse, but this is the class Tomcat uses to setup a connection pool, and I've successfully set it up in a standalone context (no pun intended).
http://jakarta.apache.org/commons/dbcp/
If you're connecting via a Tomcat app, use the built in connection pool, otherwise try DBCP. I have some code examples if you'd like them.