commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behrens Matt - Grand Rapids <Matt.Behr...@Kohler.Com>
Subject Re: DBCP: Closed connections
Date Thu, 24 Apr 2003 11:24:46 GMT
Chris Forbis wrote:

> Don't know if this is your issue but I had the same issue and it took me
> forever to track down...  It all came back to the following code...
> //Stm = Statement
> //Rs = ResultSet
> stm.close();
> rs.close();
> The problem was simple, because of the order of these is wrong the
> connection pool got messed up bad.
> Had to change to 
> rs.close();
> stm.close();
> and all started working fine...

I don't close my ResultSets or Statements -- just the connections.  I 
suppose this could be a problem, actually.  I don't know.

I've had a few little issues like that.  Most memorable was when I had 
inexplicable hangs (this is an interactive server app where the users 
come in via telnet), and I beat my head against the wall for a little 
bit before I realized I was just running out of connections because I 
never explicitly returned a few to the pool...

View raw message