Re: Totally weird behaviour in org.postgresql.Driver

Поиск
Список
Период
Сортировка
Искать
От
Kris Jurka
Тема
Re: Totally weird behaviour in org.postgresql.Driver
Дата
Msg-id
Pine.BSO.4.64.0903112335400.25261@leary.csoft.net
Ответ на
Список
Дерево обсуждения
Re: Totally weird behaviour in org.postgresql.Driver "Peter" <peter@greatnowhere.com>


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
В списке pgsql-jdbc по дате отправления
От: Peter
Дата:
От: Kris Jurka
Дата:
FAQ