Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the
Дата
Msg-id Pine.BSO.4.56.0501281837510.24668@leary.csoft.net
обсуждение исходный текст
Ответ на Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the  (Stéphane RIFF <stephane.riff@cerene.fr>)
Ответы Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Список pgsql-jdbc

On Fri, 28 Jan 2005, [ISO-8859-1] St�phane RIFF wrote:

> Yes i use it as a singleon what's the problem with that ???
> I instanciate One object => 1 pool for all threads and each thread use
> the saveTrame

The problem is you have all your preprared statements allocated in the
singleton instead of per connection.  This is bad because you
overwrite them upon each call to prepareQuery.  When you have multiple
threads doing this at once what will happen is the first thread will
prepare them and start executing, the second thread will also prepare them
and begin executing, but since the statements are global, you've replaced
the first threads versions and it will now be executing on the second
threads connection because it's using the global statements.  You've got
chaos going on here.

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: New JDBC site
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Fix for changing parameter types with server prepared statements