SyntaxFix
Write A Post
Hire A Developer
Questions
Don't reinvent the wheel.
Try one of the readily available 3rd party components:
Apache DBCP comes with different example on how to setup a pooling javax.sql.DataSource. Here is one sample that can help you get started.