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 D6AE811F60AF for ; Sat, 1 Apr 2006 04:07:14 -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 04321-09 for ; Sat, 1 Apr 2006 04:07:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 40F5111F60A7 for ; Sat, 1 Apr 2006 04:07:11 -0400 (AST) Received: (qmail 14521 invoked by uid 1112); 1 Apr 2006 08:07:11 -0000 Date: Sat, 1 Apr 2006 03:07:11 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane cc: Oliver Jowett , 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: <7738.1143868000@sss.pgh.pa.us> Message-ID: References: <442CFE4E.9000309@mobicomp.com> <442D0387.3070706@logix-tt.com> <023601c654c2$b1146410$7801a8c0@zaphod> <442DBBBB.7040409@opencloud.com> <7738.1143868000@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.118 required=5 tests=[AWL=0.118] X-Spam-Score: 0.118 X-Spam-Level: X-Archive-Number: 200604/2 X-Sequence-Number: 14936 On Sat, 1 Apr 2006, Tom Lane wrote: > 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. > The JDBC 4.0 public draft spec says: 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. If setAutoCommit is called and the value for auto-commit is not changed from its current value, it is treated as a no-op. The JDK1.6 beta2 javadoc confirms this: NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is committed. If setAutoCommit is called and the auto-commit mode is not changed, the call is a no-op. So I think we're fine. Kris Jurka