Re: JDBC and transactions

From: "Chris White (cjwhite)" <cjwhite(at)cisco(dot)com>
To: "'Kris Jurka'" <books(at)ejurka(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC and transactions
Date: 2005-04-03 20:27:36
Message-ID: 200504032027.j33KRa3S010688@sj-core-4.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thanks that helps me solve my problem.

-----Original Message-----
From: Kris Jurka [mailto:books(at)ejurka(dot)com]
Sent: Friday, April 01, 2005 11:33 PM
To: Chris White (cjwhite)
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] JDBC and transactions

On Fri, 1 Apr 2005, Chris White (cjwhite) wrote:

> 1) When does a transaction start? As soon as I do the first
> insert/update on the connection or as soon as I set autocommit off?
> 2) After doing a commit, when does the next transaction start?

This depends on the driver version you are using. The 7.4 driver starts a
transaction immediately upon setAutoCommit(false) and starts the next
transaction immediately upon commit. The 8.0 driver starts the transaction
on the first execution for both the initial and subsequent transactions.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message luke 2005-04-03 20:54:35 Re: DataSource lookup
Previous Message Nico 2005-04-03 09:33:03 DataSource lookup