commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [Pool] Thread safety
Date Fri, 07 Mar 2003 17:10:52 GMT
I think there can be scenarios where borrowing and returning objects at the
same time can cause problems with the connection pool. I have experienced
some of those in my application. Would advise strong and prolonged load
testing on a machine with low heap size to make sure that your pool is
thread safe.
I think the returnObject method of the GenericObjectPool should be
synchronized to be absolutely sure that the pool is thread safe.

-----Original Message-----
From: Tauzell, Dave []
Sent: Friday, March 07, 2003 10:53 AM
Subject: [Pool] Thread safety

I saw this on the archives, but there wasn't a reply.  Is it safe to
have multiple threads borrowing and returning objects?  Or should I
always synchronize those calls. My gut feel is that since you can have a
thread checking for idle connections that their must be some build in
thread safety, but I'm not sure.

View raw message