Re: Bug: Transaction still open after error when autocommit=true

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Bug: Transaction still open after error when autocommit=true
Дата
Msg-id 4EF368EE0200002500044065@gw.wicourts.gov
обсуждение исходный текст
Ответ на Bug: Transaction still open after error when autocommit=true  (Daniel Migowski <dmigowski@ikoffice.de>)
Ответы Re: Bug: Transaction still open after error when autocommit=true  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Daniel Migowski <dmigowski@ikoffice.de> wrote:

> A small demo for the bug is attached.

The javadocs for Connection:

http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html

say:

| JDBC applications should use the appropritate Connection method
| such as setAutoCommit or setTransactionIsolation. Applications
| should not invoke SQL commands directly to change the connection's
| configuration when there is a JDBC method available.

I take that to mean that the right way to do this is to set
autoCommit to false and use the connection's commit() method.  If
you do it that way, is there a problem?

-Kevin

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

Предыдущее
От: Daniel Migowski
Дата:
Сообщение: Bug: Transaction still open after error when autocommit=true
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Bug: Transaction still open after error when autocommit=true