From: Kris Jurka <books@ejurka.com>
To: Stéphane RIFF <stephane.riff@cerene.fr>
Cc: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the
Date: Fri, 28 Jan 2005 18:46:28 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0501281837510.24668@leary.csoft.net> (raw)
In-Reply-To: <41FA39D7.1070008@cerene.fr>
References: <41F75206.2030603@cerene.fr>
<41FA1D52.4080505@cerene.fr>
<41FA31C3.8010502@fastcrypt.com>
<41FA39D7.1070008@cerene.fr>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, stephane.riff@cerene.fr, pg@fastcrypt.com
Subject: Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the
In-Reply-To: <Pine.BSO.4.56.0501281837510.24668@leary.csoft.net>
References: <41F75206.2030603@cerene.fr> <41FA1D52.4080505@cerene.fr> <41FA31C3.8010502@fastcrypt.com> <41FA39D7.1070008@cerene.fr> <Pine.BSO.4.56.0501281837510.24668@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox