Re: Sun Java Creatror2 postgresql 8.1 - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Sun Java Creatror2 postgresql 8.1
Date
Msg-id Pine.BSO.4.63.0604180120060.21483@leary2.csoft.net
Whole thread Raw
In response to Sun Java Creatror2 postgresql 8.1  (Владимир Лашин<lash@donenergo.ru>)
List 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
Attachment

pgsql-jdbc by date:

Previous
From: Владимир Лашин
Date:
Subject: Sun Java Creatror2 postgresql 8.1
Next
From: Achilleus Mantzios
Date:
Subject: Thoughts on a Isolation/Security problem.