Skip site navigation (1) Skip section navigation (2)

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

From: Kris Jurka <books(at)ejurka(dot)com>
To: Stéphane RIFF <stephane(dot)riff(at)cerene(dot)fr>
Cc: pg(at)fastcrypt(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [SPAM] - Re: JDBC HighLoad - Found word(s) XXX in the
Date: 2005-01-28 23:46:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

On Fri, 28 Jan 2005, [ISO-8859-1] Stphane 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

In response to


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-01-30 06:22:57
Subject: Re: Fix for changing parameter types with server prepared statements
Previous:From: Kris JurkaDate: 2005-01-28 23:16:27
Subject: Re: New JDBC site

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group