pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Michael Paesold <mpaesold@gmx.at>
Cc: Markus Schaber <schabi@logix-tt.com>
Cc: João Paulo Ribeiro <jp@mobicomp.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Behaviour of setAutoCommit may not be completely correct.
Date: Sat, 01 Apr 2006 11:31:07 +1200
Message-ID: <442DBBBB.7040409@opencloud.com> (raw)
In-Reply-To: <023601c654c2$b1146410$7801a8c0@zaphod>
References: <442CFE4E.9000309@mobicomp.com>
	<442D0387.3070706@logix-tt.com>
	<023601c654c2$b1146410$7801a8c0@zaphod>

Michael Paesold wrote:

> has (same for 1.5.0 and 1.4.2):
> 
> setAutoCommit:
> ...
> "NOTE: If this method is called during a transaction, the transaction is 
> committed."
> 
> This sentence is completely unambigously stating that calling the method 
> will commit a running transaction. If the postgresql jdbc driver is in 
> violation of this, it should be fixed. Otherwise it will break 
> applications that are written based on the specified semantics.

Note that this is new to the JDBC3 javadoc. The JDBC2 javadoc doesn't 
have that note.

The main spec (e.g. the JDBC 3.0 PDF) document is unambiguous, too, but 
describes different behaviour:

> The default is for auto-commit mode to be enabled when the Connection
> object is created. If the value of auto-commit is changed in the middle
> of a transaction, the current transaction is committed.

The specification behaviour is what the driver implements (it sounds 
like Oracle did the same thing too).

Does the specification trump the javadoc, or vice versa?

-O



view thread (9+ messages)  latest in thread

Message-ID: <442DBBBB.7040409@opencloud.com>
Permalink:  ../442DBBBB.7040409@opencloud.com/
Also on:    postgresql.org/message-id/442DBBBB.7040409@opencloud.com

 · 

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: oliver@opencloud.com, mpaesold@gmx.at, schabi@logix-tt.com, jp@mobicomp.com
  Subject: Re: Behaviour of setAutoCommit may not be completely correct.
  In-Reply-To: <442DBBBB.7040409@opencloud.com>
  References: <442CFE4E.9000309@mobicomp.com> <442D0387.3070706@logix-tt.com> <023601c654c2$b1146410$7801a8c0@zaphod> <442DBBBB.7040409@opencloud.com>

* 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