pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Chris White (cjwhite) <cjwhite@cisco.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC and transactions
Date: Mon, 4 Apr 2005 12:09:18 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0504041206280.2383@leary.csoft.net> (raw)
In-Reply-To: <200504032239.j33MdsgS029843@sj-core-3.cisco.com>
References: <200504032239.j33MdsgS029843@sj-core-3.cisco.com>



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



view thread (8+ messages)

Message-ID: <Pine.BSO.4.56.0504041206280.2383@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0504041206280.2383@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0504041206280.2383@leary.csoft.net

 · 

reply

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: books@ejurka.com, cjwhite@cisco.com
  Subject: Re: JDBC and transactions
  In-Reply-To: <Pine.BSO.4.56.0504041206280.2383@leary.csoft.net>
  References: <200504032239.j33MdsgS029843@sj-core-3.cisco.com> <Pine.BSO.4.56.0504041206280.2383@leary.csoft.net>

* 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