Re: JDBC and transactions - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: JDBC and transactions
Date
Msg-id Pine.BSO.4.56.0504020229300.29873@leary.csoft.net
Whole thread Raw
In response to JDBC and transactions  ("Chris White (cjwhite)" <cjwhite@cisco.com>)
Responses Re: JDBC and transactions
Re: JDBC and transactions
List pgsql-jdbc

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

pgsql-jdbc by date:

Previous
From: "Chris White (cjwhite)"
Date:
Subject: JDBC and transactions
Next
From: "Nico"
Date:
Subject: DataSource lookup