commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodney Waldhoff <rwaldh...@apache.org>
Subject RE: [DBCP] Exceptions in multi user environment.
Date Mon, 03 Mar 2003 23:21:02 GMT
On Mon, 3 Mar 2003, srinath narasimhan wrote:

> I am using DBCP and found that similar error happens if one of my thread
> crashes and does not return
> the connection to the pool. I beleive that the connection is closed, but it
> is not removed from the pool
> for some reason. Once I fix the thread crash issue, it seems to go away.
> But I was able to reproduce the problem for certain.

The pool should see the connection as "active" in this case, and not
return it to the client code.  (Assuming the "abandonded object" stuff
isn't configured.)  Indeed, it is likely the pool doesn't even have a
reference to the object in this case, which would allow the gc process to
close the connection, but wouldn't cause it to be returned by the pool
again.

>
> The way I found is, I had debug in my object shutdowns and printed the
> thread which is executing
> the shutdown, I found that whenever Finalizer thread was executing through
> the shutdown ( which happens during crash )
> I got this error on the next database access.
>
> Hope this helps.
>

Mime
View raw message