Give me an explanation : Commons DBCP !
Hi all experts,
I am using the Tomcat server to deploy my web application. My web application accesses the MySQL database on the server.
I faced the problem of "Too many Connections" and went through a few websites regarding the error.
Finally, I found the solution and successfully implemented the Commons DBCP.
Now I want to know a few things :
DBCP creates a pool of connections. Connections r served on demand from this pool.
But still, in the code that I use in my JSP/Servlet, I have to explicitly close the connection....con.close().
Is it necessary to do that ?
What possible errors could I get if I don't do that ?
Could any1 please elaborate ?
Regards,
Sherbir
__________________
Regards,
Sherbir
|