Re: JDBC and transactions - Mailing list pgsql-jdbc

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

On Sun, 3 Apr 2005, Chris White (cjwhite) wrote:

> So I should setAutoCommit(true) after doing the commit to end the
> transaction. But won't this waste a transaction, if the next transaction
> starts immediately upon the commit?
>

Well, again that depends on what driver version you are using.  8.0 will
not have started a new transaction yet so one will not be used.  For 7.4 a
transaction indeed will be wasted.  You could try and be clever and use
setAutoCommit(true) instead of commit() because it will commit your
transaction and not start another, but this would be confusing from a
readability point at least.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: 8.0.1 performance question.
Next
From: Paul Marchant
Date:
Subject: getTransactionIsolation() causes SQLException - unrecognized configuration parameter xactisolevel