Re: JDBC and transactions

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC and transactions
Дата
Msg-id Pine.BSO.4.56.0504041206280.2383@leary.csoft.net
обсуждение исходный текст
Ответ на Re: JDBC and transactions  ("Chris White (cjwhite)" <cjwhite@cisco.com>)
Список pgsql-jdbc

On Sun, 3 Apr 2005, Chris White (cjwhite) wrote:

> So I should setAutoCommit(true) after doing the commit to end the
> transaction. But won't this waste a transaction, if the next transaction
> starts immediately upon the commit?
>

Well, again that depends on what driver version you are using.  8.0 will
not have started a new transaction yet so one will not be used.  For 7.4 a
transaction indeed will be wasted.  You could try and be clever and use
setAutoCommit(true) instead of commit() because it will commit your
transaction and not start another, but this would be confusing from a
readability point at least.

Kris Jurka

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: 8.0.1 performance question.
Следующее
От: Paul Marchant
Дата:
Сообщение: getTransactionIsolation() causes SQLException - unrecognized configuration parameter xactisolevel