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 24C6C11F61E3 for ; Fri, 31 Mar 2006 19:31:13 -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 55691-07 for ; Fri, 31 Mar 2006 19:31:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 13B6811F61BF for ; Fri, 31 Mar 2006 19:31:10 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.247]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1FPT4z-0000SR-Bl; Sat, 01 Apr 2006 11:30:57 +1200 Message-ID: <442DBBBB.7040409@opencloud.com> Date: Sat, 01 Apr 2006 11:31:07 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Paesold CC: 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. References: <442CFE4E.9000309@mobicomp.com> <442D0387.3070706@logix-tt.com> <023601c654c2$b1146410$7801a8c0@zaphod> In-Reply-To: <023601c654c2$b1146410$7801a8c0@zaphod> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200603/153 X-Sequence-Number: 14934 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