commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: [DBCP] close issues
Date Mon, 23 Jul 2007 22:32:07 GMT
On Jul 21, 2007, at 12:35 PM, Phil Steitz wrote:

> Its not quite that bad now; but the returning orphans do not get
> closed on return.  What happens now is that the GOP throws
> IllegalStateException when you try to return an object (or perform any
> other operation) on a closed pool.  We could include a patch in pool
> 1.3.1 to passivate and destroy a returning orphan before throwing the
> IllegalStateException, taking a baby step toward better lifeclycle
> management.  Since the pool does not hold references to these orphans
> once its closed, I am not sure how big a problem this is in general;
> though certainly for dbcp, the underlying physical connections do not
> get closed right away in this case.

I implemented the IllegalStateException idea.  Now when close is  
called on BasicDataSource, it is marked as close and no new  
connections will be created (you get a SQLException).  As before the  
idle connections are immedately destroyed and the close method  
returns.  As the active connections are closed, they are destroyed.

-dain

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message