X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 909DC8B9BD1 for ; Mon, 31 Jan 2005 13:58:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61303-04 for ; Mon, 31 Jan 2005 13:58:27 +0000 (GMT) Received: from relay.imatech.net (relay.imatech.net [81.255.215.226]) by svr1.postgresql.org (Postfix) with ESMTP id 958B78B9B59 for ; Mon, 31 Jan 2005 13:57:41 +0000 (GMT) Received: from pop.imatech.net (81.255.215.227) by relay.imatech.net with MERCUR Mailserver (v4.03.06 MTI0LTIzMDYtNjkyMw==) for ; Mon, 31 Jan 2005 14:55:13 +0100 Received: from imatech.net (81.255.215.225) by pop.imatech.net with MERCUR Mailserver (v4.03.06 ODUtMjQzNS00ODc3) for ; Mon, 31 Jan 2005 14:55:36 +0100 Received: from smtp.imatech.net ([81.255.215.236]) by imatech.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 31 Jan 2005 14:55:06 +0100 Received: from [200.200.200.185] ([195.6.193.141]) by smtp.imatech.net with Microsoft SMTPSVC(6.0.3790.211); Mon, 31 Jan 2005 14:55:05 +0100 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.2]); Mon, 31 Jan 2005 14:56:22 +0100 Message-ID: <41FE3906.7010008@cerene.fr> Date: Mon, 31 Jan 2005 14:56:22 +0100 From: =?ISO-8859-1?Q?St=E9phane_RIFF?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en To: Kris Jurka Cc: pgsql-jdbc@postgresql.org Subject: Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s) References: <41F75206.2030603@cerene.fr> <41FA1D52.4080505@cerene.fr> <41FA31C3.8010502@fastcrypt.com> <41FA39D7.1070008@cerene.fr> In-Reply-To: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-OriginalArrivalTime: 31 Jan 2005 13:55:05.0828 (UTC) FILETIME=[77ED9A40:01C5079C] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.234 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/297 X-Sequence-Number: 12177 Ok so how can i make a preparedStatement pool or allocated my preparedStatements for each connection ??? Kris Jurka wrote: >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 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 28/01/2005