You can still have a base DAO class that all DAO's extend from that provide database access, but it should call a connection pool that the server can manage. You will need a way to connect the code to the pool (by use of JNDI usually) but at least then you can change the database information later without changing code.
You could also load a properties file that stores the JNDI if there is a chance you want to change the JNDI later although this can be overkill.
Ok here's how I changed the code. I read in the link above that the connections won't return to the pool unless they are closed. I added a cleanup() method for all subclasses to call in their finally blocks after using a connection.
Does this look better? Anything else I should change wrt connection pooling or other standard DAO practices?
Also, we're using Tomcat 5 for our App Server. Here's the datasource info in server.xml. Any tweaks I should be making here?
Thanks again for everyone's time and consideration.
[ August 31, 2006: Message edited by: Aaron Wilt ] [ August 31, 2006: Message edited by: Aaron Wilt ]