Request to check isolation level before throwing exception

Поиск
Список
Период
Сортировка
От Ben Weber
Тема Request to check isolation level before throwing exception
Дата
Msg-id e28334cd0907301518l4255036cj4e9ce960f80f27a9@mail.gmail.com
обсуждение исходный текст
Список pgsql-jdbc
I am using atomikos 3.5.6. with Postgres 8.4 and have ran into the following problem: Cannot change transaction isolation level in the middle of a transaction. Due to the way that Atomikos manages the Pool of XA connections, I cannot prevent setTransactionIsolation from being called in the middle of transactions. I would like to propose a simple fix for this issue. The setTransactionIsolation method should check the current isolation level before throwing an exception.

Proposed fix in AbstractJdbc2Connection.java:

public void setTransactionIsolation(int level) throws SQLException
{

       // check current level before proceeding
        if (level == getTransactionIsolation()) {
            return;
        }

      ......

}


I have tested this patch in my environment and it fixed the problem. Is it possible to get this change committed to the main build?

Thanks,
Ben Weber

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

Предыдущее
От: Ben Weber
Дата:
Сообщение: unnecessary exception patch
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Datatype of domains not reported correctly.