Re: PoolingDataSource executeUpdate

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: ALBERDI Ion <alberdi(at)enseirb(dot)fr>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PoolingDataSource executeUpdate
Date: 2004-06-24 10:21:32
Message-ID: 40DAAB2C.1040408@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message ALBERDI Ion 2004-06-24 14:44:56 executeUpdate dbcp driver
Previous Message Kris Jurka 2004-06-24 09:52:40 Re: Typo in build.xml?