X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A0AD511F660D for ; Tue, 18 Apr 2006 03:38:30 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.106 X-Spam-Level: X-Spam-Status: No, score=0.106 required=5 tests=[AWL=0.106] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id xvw+otZQB8mq for ; Tue, 18 Apr 2006 03:38:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 1521211F65DB for ; Tue, 18 Apr 2006 03:38:26 -0300 (ADT) Received: (qmail 19799 invoked by uid 1112); 18 Apr 2006 06:38:26 -0000 Date: Tue, 18 Apr 2006 01:38:26 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: =?koi8-r?Q?=F7=CC=C1=C4=C9=CD=C9=D2_?= =?koi8-r?Q?=EC=C1=DB=C9=CE?= cc: pgsql-jdbc@postgresql.org Subject: Re: Sun Java Creatror2 postgresql 8.1 In-Reply-To: <1145338200.6717.22.camel@gp12ito07.donenergo.net> Message-ID: References: <1145338200.6717.22.camel@gp12ito07.donenergo.net> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1837269567-1145341950=:21483" Content-ID: X-Archive-Number: 200604/120 X-Sequence-Number: 15054 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1837269567-1145341950=:21483 Content-Type: TEXT/PLAIN; CHARSET=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Tue, 18 Apr 2006, =F7=CC=C1=C4=C9=CD=C9=D2 =EC=C1=DB=C9=CE 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=20 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= =20 as trying to actually change the value. The case of setting the=20 isolation level to the current isolation is really a no-op, so we could=20 allow that. The attached patch implements this check although a more complete version= =20 should do some sort of caching of the isolation level to avoid server=20 calls. Could you please try out one of the jar files here and report back as to=20 whether that fixes your problem? http://www.ejurka.com/pgsql/jars/lash/ Kris Jurka --0-1837269567-1145341950=:21483 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=unchanged-isolation.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=unchanged-isolation.patch SW5kZXg6IG9yZy9wb3N0Z3Jlc3FsL2pkYmMyL0Fic3RyYWN0SmRiYzJDb25u ZWN0aW9uLmphdmENCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxl OiAvdXNyL2xvY2FsL2N2c3Jvb3QvcGdqZGJjL3BnamRiYy9vcmcvcG9zdGdy ZXNxbC9qZGJjMi9BYnN0cmFjdEpkYmMyQ29ubmVjdGlvbi5qYXZhLHYNCnJl dHJpZXZpbmcgcmV2aXNpb24gMS4zMg0KZGlmZiAtYyAtcjEuMzIgQWJzdHJh Y3RKZGJjMkNvbm5lY3Rpb24uamF2YQ0KKioqIG9yZy9wb3N0Z3Jlc3FsL2pk YmMyL0Fic3RyYWN0SmRiYzJDb25uZWN0aW9uLmphdmEJMSBBdWcgMjAwNSAw Njo1NDoxNCAtMDAwMAkxLjMyDQotLS0gb3JnL3Bvc3RncmVzcWwvamRiYzIv QWJzdHJhY3RKZGJjMkNvbm5lY3Rpb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