|
From: Bruce M. <br...@mc...> - 2003-07-24 01:32:37
|
Jonathan, I haven't heard from you in some time - how is it going? The work that you have done on babeldoc in recent weeks and months has been excellent. I am hoping to see your work on the xml entity resolver. regards, Bruce. On Thursday 10 July 2003 06:42 pm, Leech, Jonathan wrote: > I think we need to remove synchronization from the checkIn() and checkOut() > methods of PooledJdbc.java, and here's the reason why: It causes deadlock > every time the connection pool is exhausted. > > Example: > - All database connections in the pool are being used by various threads. > - A thread calls checkOut(), which locks the PooledJdbc object, and the > connection pool is waiting for a checkin. > - As the various threads finish using their database connections, they call > checkIn(), but are locked out. > > The only problem I see with it doing it is that there's a chance that > multiple threads could ask for the first connection, which calls > setupJdbc(), and that might be not well behaved. I think moving the > setupJdbc to the default constructor would handle this. > > Thoughts? > > -Jonathan |