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 [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 10:53 AM To: [EMAIL PROTECTED] 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. -Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
