On Wed, 11 Mar 2009, Peter wrote:
>
> I added a bunch more synchronized (mutex) blocks in my code to avoid
> getConnection being called simultaneously from multiple threads (why isnt
> that method synchronized anyway?) - so far so good... keeping fingers
> crossed. Maybe should have just subclassed PGSimpleDataSource...
I'm not sure why it needs to be synchronized. The attached test case (20
threads each opening and closing connections as fast as possible) doesn't
show any problems for me. Does it fail for you? Is there a particular
change that fixes it for you?
Kris Jurka