I have several servlets working on a Tomcat server. Now I let them create db connections for each request and close them after use. This may lead to huge overhead for establishing/closing connections. What about using a single connection manager servlet to share a global connection among all servlets (i.e. all servlets use the same connection). Is this a good practice or there may be problems for concurrent operations?
Share
You should read about connection pools:
C3PO, BoneCP, DBCP
This are the best and popular connection pools available, i am using BoneCP in my production project.