how to overcome from the exception java.sql.SQL.Ex ception: [My Sql)[ODBC 3.51 Driver] Too many connections
Sql Exception
Collapse
X
-
Originally posted by haran22how to overcome from the exception java.sql.SQL.Ex ception: [My Sql)[ODBC 3.51 Driver] Too many connections
create and they take quite a lot of resources. Databases can only handle a
limited amount of connections.
When you're done using a connection you're supposed to close the connection
in order to relinguish all those database resources. You didn't do that and so
the database started complaining.
You could either try to manage those connections yourself or you could use
one of the many available ConnectionPools ; they all apply their own strategy
how and when a connection should be closed or not.
Have a look at http://www.apache.org, they have very fine ConnectionPools
available in their 'commons' sub project.
kind regards,
Jos
Comment