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 DB00C8B9D10 for ; Fri, 4 Feb 2005 13:18:06 +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 11939-03 for ; Fri, 4 Feb 2005 13:17:59 +0000 (GMT) Received: from relay.imatech.net (relay.imatech.net [81.255.215.226]) by svr1.postgresql.org (Postfix) with ESMTP id 6CC4B8B9C97 for ; Fri, 4 Feb 2005 13:17:59 +0000 (GMT) Received: from pop.imatech.net (81.255.215.227) by relay.imatech.net with MERCUR Mailserver (v4.03.06 MTI0LTIzMDYtNjkyMw==) for ; Fri, 4 Feb 2005 14:15:16 +0100 Received: from imatech.net (81.255.215.225) by pop.imatech.net with MERCUR Mailserver (v4.03.13 ODUtMjQzNS00ODc3) for ; Fri, 4 Feb 2005 14:13:10 +0100 Received: from [200.200.200.185] ([195.6.193.141]) by imatech.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 4 Feb 2005 14:15:12 +0100 Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.8.5]); Fri, 04 Feb 2005 14:16:50 +0100 Message-ID: <420375C2.2020309@cerene.fr> Date: Fri, 04 Feb 2005 14:16:50 +0100 From: =?UTF-8?B?U3TDqXBoYW5lIFJJRkY=?= 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> <41FE3906.7010008@cerene.fr> <42032CEC.6000205@cerene.fr> In-Reply-To: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed X-OriginalArrivalTime: 04 Feb 2005 13:15:12.0296 (UTC) FILETIME=[8EEC9A80:01C50ABB] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.173 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/27 X-Sequence-Number: 12207 I thought that the m_conn.close() released the connection to the pool doesn't it ? If i close the connection at the end of the loop byt a SQLoader.close() this will make one connection for each thread. I want each thread ask a connection to the pool and released it after each update. Thanks for your time Bye Kris Jurka wrote: >On Fri, 4 Feb 2005, [ISO-8859-1] St�phane RIFF wrote: > > > >>Hello, >>I implement like you said in the last post but now i get some errors >>like this : >> >>2005-02-04 09:03:26,234 : [WARN] SQLoader - java.sql.SQLException: >>org.apache.commons.dbcp.DelegatingPreparedStatement is closed. >>I attach the two class i you want to see >> >> >> > >Your main loop is written: > >SQLoader sl = new SQLoader(); >for(int i=0;i<100;i++) { > sl.saveTrame( ... ); >} > >but the end of the saveTrame method you have: > >finally { > try { > m_conn.commit(); > m_conn.close(); > >This closes the connection on the first iteration of the loop. I'd >suggest something like adding SQLoader.close() which gets called at the >end of the for loop. > >Kris Jurka > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.5 - Release Date: 03/02/2005