X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 33CEE11F6757 for ; Sat, 1 Apr 2006 01:06:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75097-01 for ; Sat, 1 Apr 2006 01:06:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D777011F674B for ; Sat, 1 Apr 2006 01:06:48 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3156e1b007739; Sat, 1 Apr 2006 00:06:41 -0500 (EST) To: Oliver Jowett cc: Michael Paesold , Markus Schaber , =?ISO-8859-1?Q?Jo=E3o_Paulo_?= =?ISO-8859-1?Q?Ribeiro?= , pgsql-jdbc@postgresql.org 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> Comments: In-reply-to Oliver Jowett message dated "Sat, 01 Apr 2006 11:31:07 +1200" Date: Sat, 01 Apr 2006 00:06:40 -0500 Message-ID: <7738.1143868000@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200604/1 X-Sequence-Number: 14935 Oliver Jowett writes: > Does the specification trump the javadoc, or vice versa? The spec certainly ought to win, but the fact that the change in the javadoc is more recent is a pretty clear clue what Sun thinks. You quote the spec text as >> 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. I don't see that as unambiguous. If the autocommit setting is *changed* then it's clear what must happen, but calling the method with the same setting that already prevails could easily be considered not to cause a "change" in the setting. It looks to me like Sun is trying to clarify their reading of that detail with the javadoc change. It's a crummy way to handle it; they should have updated the spec. But I'd say the handwriting is on the wall about what the next spec version will say. Is it reasonable to provide an option about how to handle this case? regards, tom lane