aspose file tools
The moose likes Java in General and the fly likes max DB connections exceeding issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "max DB connections exceeding issue" Watch "max DB connections exceeding issue" New topic
Author

max DB connections exceeding issue

Uvindra DJ
Greenhorn

Joined: Feb 27, 2006
Posts: 2
Hi people,

This is my first post so please be nice to me

Im connecting to a MySQL database from a stand alone java application via NetBeans 5

Sometimes the application does not display data from the database & when I check the connection through NetBeans I get an error saying that the Max No. of database connections has been reached in the JVM

I the coding in my application I have enclosed the the database connection within a try catch block which also includes a finaly statement.Within the finaly statement I check if any result sets or connections are open and I close them. So I dont quite understand how the no. of connections can continue to build up till the max limit is reached.

According to my knowledge I dont understand why this happens.Have I missed anything?

Thanks

Regards,
Uvindra
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

Have I missed anything?

Maybe you're not really closing and cleaning everything as needed.
It would be difficult to tell without seeing the code, but make sure all the Statement, ResultSet, Connection instances are closed in any place (best place would be the finally clause)


[My Blog]
All roads lead to JavaRanch
Uvindra DJ
Greenhorn

Joined: Feb 27, 2006
Posts: 2
Thanks for the advice, I'll recheck my code
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: max DB connections exceeding issue
 
Similar Threads
making the database connection in netbeanside5.5
Connection Pooling Help Needed
DB connection pooling
jdbc-servlets-connection pooling
ORA-01000: maximum open cursors exceeded