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 47484D1B18E for ; Thu, 24 Jun 2004 07:20:12 -0300 (ADT) 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 54533-07 for ; Thu, 24 Jun 2004 10:20:10 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id C2607D1B170 for ; Thu, 24 Jun 2004 07:20:06 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BdRKl-0002s4-00; Thu, 24 Jun 2004 22:19:55 +1200 Message-ID: <40DAAB2C.1040408@opencloud.com> Date: Thu, 24 Jun 2004 22:21:32 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: ALBERDI Ion , pgsql-jdbc@postgresql.org Subject: Re: PoolingDataSource executeUpdate References: <1087999760.40d98f100eb07@www.enseirb.fr> <40DA3EB8.4080700@opencloud.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200406/163 X-Sequence-Number: 10365 Kris Jurka wrote: > > On Thu, 24 Jun 2004, Oliver Jowett wrote: > > >>ALBERDI Ion wrote: >> >> >>>What happens there is that with Connection Pooling the executeUpdate method >>>always returns 0, and that the database is not upgraded. >>>I'm currently forced to use the Jdbc3SimpleDataSource class (with this class >>>the application runs perfectly) but I would like to use Connection Pools to >>>improve the application's performances. >> >>I notice that the default autocommit setting in >>org.postgresql.jdbc2.optional.ConnectionPool is false. This is the >>opposite of the required Connection default and seems like a bug to me. > > > True, but that doesn't explain why executeUpdate returns an affected row > count of zero. I was thinking along the lines of an insert on a separate connection not being committed, or the insert not being visible to the update's transaction (which will be a very long transaction if the app is expecting autocommit..). i.e. executeUpdate() is fine, it's just that the update sees a different set of data to what is expected by the app. -O