Re: Sun Java Creatror2 postgresql 8.1

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Sun Java Creatror2 postgresql 8.1
Дата
Msg-id Pine.BSO.4.63.0604180120060.21483@leary2.csoft.net
обсуждение исходный текст
Ответ на Sun Java Creatror2 postgresql 8.1  (Владимир Лашин<lash@donenergo.ru>)
Список pgsql-jdbc

On Tue, 18 Apr 2006, �������� ����� wrote:

> But "someDataProvider.commitChanges()" works only first time.
> Then the only message i get after "someDataProvider.commitChanges()" is
> "can't change isolation level in the middle of transaction".

This is a known issue, please see the archives for the history of it.

I did have a new thought about it today though.  Perhaps the application
isn't doing something like:

conn.setAutoCommit(false);
conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
conn.createStatement().execute("SELECT ..");
conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);

but instead is simply resetting the transaction isolation to the current
value.  That seems like a poorly coded application, but not one as broken
as trying to actually change the value.  The case of setting the
isolation level to the current isolation is really a no-op, so we could
allow that.

The attached patch implements this check although a more complete version
should do some sort of caching of the isolation level to avoid server
calls.

Could you please try out one of the jar files here and report back as to
whether that fixes your problem?

http://www.ejurka.com/pgsql/jars/lash/

Kris Jurka
Вложения

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

Предыдущее
От: Владимир Лашин
Дата:
Сообщение: Sun Java Creatror2 postgresql 8.1
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: Thoughts on a Isolation/Security problem.