> -----Original Message----- > From: Daniel Blumenthal [mailto:[EMAIL PROTECTED] > Sent: Friday, January 13, 2006 8:51 PM > To: 'Tomcat Users List' > Subject: RE: connection pooling mysql (Pool Exhausted exception) > > I received a similar (identical?) error when I was first > starting up, and > the solution was to be very careful to ALWAYS close ResultSets. > > ResultSet rset = stmt.executeQuery("select foo from bar where ID=7"); > int foo = rset.getInt(1); > rset.close(); >
You might want to look at FindBugs http://findbugs.sourceforge.net/ It is really good at finding these kinds of issues in programs automatically. My coding cycle usually goes: Code a Module Fix Compile Errors Run FindBugs, Lint, and PMD Fix reported issues Test/Debug By using automated code analysis tools, the test/debug cycle is about 1/4th to 1/2 of the normal length. This is because FindBugs/Lint/PMD catch things like assigned values to variables that are not used, unused variables, invalid object comparisons, questionable casts, and such. The other two tools I referenced are: PMD http://pmd.sourceforge.net/ Enerjy Analyzer: http://www.enerjy.com/for-developers/code-analysis.html George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]