From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: ALBERDI Ion <alberdi@enseirb.fr>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PoolingDataSource executeUpdate
Date: Thu, 24 Jun 2004 22:21:32 +1200
Message-ID: <40DAAB2C.1040408@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0406240134001.27120@leary.csoft.net>
References: <1087999760.40d98f100eb07@www.enseirb.fr>
<40DA3EB8.4080700@opencloud.com>
<Pine.BSO.4.56.0406240134001.27120@leary.csoft.net>
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
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: oliver@opencloud.com, books@ejurka.com, alberdi@enseirb.fr
Subject: Re: PoolingDataSource executeUpdate
In-Reply-To: <40DAAB2C.1040408@opencloud.com>
References: <1087999760.40d98f100eb07@www.enseirb.fr> <40DA3EB8.4080700@opencloud.com> <Pine.BSO.4.56.0406240134001.27120@leary.csoft.net> <40DAAB2C.1040408@opencloud.com>
* 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