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