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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to