Re: Behaviour of setAutoCommit may not be completely correct.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Behaviour of setAutoCommit may not be completely correct.
Дата
Msg-id 7738.1143868000@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Behaviour of setAutoCommit may not be completely correct.  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Behaviour of setAutoCommit may not be completely correct.  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Behaviour of setAutoCommit may not be completely correct.
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Behaviour of setAutoCommit may not be completely correct.