commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav.Go...@ercgroup.com
Subject RE: [DBCP] Exceptions in multi user environment.
Date Thu, 06 Mar 2003 04:15:07 GMT
Is it possible that in some situation causes the pool to store two
references to the same connection?

-----Original Message-----
From: Rodney Waldhoff [mailto:rwaldhoff@apache.org]
Sent: Monday, March 03, 2003 5:21 PM
To: Jakarta Commons Users List
Subject: RE: [DBCP] Exceptions in multi user environment.


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.
>

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

Mime
View raw message