What is talxy?
Sun Java Creatror2  postgresql 8.1
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PostgreSQL database development > Sun Java Creatror2 postgresql 8.1 18 April 2006 10:38:26

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Sun Java Creatror2 postgresql 8.1

чМБДЙНЙТ мБЫЙО 18 April 2006 10:38:26
 Hi.

Sun Java Studio Creator 2 and PostgreSQL 8.1 database
using 8.1-405 jdbc3.

Connectin,fetching,­... works.

But "someDataProvider.c­ommitChanges()" works only first time.
Then the only message i get after "someDataProvider.c­ommitChanges()" is
"can't change isolation level in the middle of transaction".
I must use stored procedures for update and insert records. It works
fine.

When i change the data provider to MySQL
all works fine (i mean "someDataProvider.c­ommitChanges()").

Can anybody comment ?.

Thanks.



-------------------­--------(end of broadcast)---------­------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Add comment
Kris Jurka 18 April 2006 10:38:26 permanent link ]
 

On Tue, 18 Apr 2006, чМБДЙНЙТ мБЫЙО wrote:
But "someDataProvider.c­ommitChanges()" works only first time.> Then the only message i get after "someDataProvider.c­ommitChanges()" 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.setTransaction­Isolation(Connection­.TRANSACTION_READ_CO­MMITTED);
conn.createStatemen­t().execute("SELECT ..");
conn.setTransaction­Isolation(Connection­.TRANSACTION_SERIALI­ZABLE);

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.c­om/pgsql/jars/lash/

Kris Jurka

Index: org/postgresql/jdbc­2/AbstractJdbc2Conne­ction.java
===================­====================­====================­========
RCS file: /usr/local/cvsroot/­pgjdbc/pgjdbc/org/po­stgresql/jdbc2/Abstr­actJdbc2Connection.j­ava,v
retrieving revision 1.32
diff -c -r1.32 AbstractJdbc2Connec­tion.java
*** org/postgresql/jdbc­2/AbstractJdbc2Conne­ction.java1 Aug 2005 06:54:14 -00001.32
--- org/postgresql/jdbc­2/AbstractJdbc2Conne­ction.java18 Apr 2006 06:34:52 -0000
***************
*** 725,730 ****
--- 725,733 ----
*/
public void setTransactionIsola­tion(int level) throws SQLException
{
+ if (getTransactionIsol­ation() == level)
+ return;
+
if (protoConnection.ge­tTransactionState() != ProtocolConnection.­TRANSACTION_IDLE)
throw new PSQLException(GT.tr­("Cannot change transaction isolation level in the middle of a transaction."),
PSQLState.ACTIVE_SQ­L_TRANSACTION);



-------------------­--------(end of broadcast)---------­------------------
TIP 4: Have you searched our list archives?

http://archives.pos­tgresql.org
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PostgreSQL database development > Sun Java Creatror2 postgresql 8.1 18 April 2006 10:38:26

see also:
Problem with order by .......... asc
Speeding up index creation
Postgresql <--> webservices?
пройди тесты:
see also:
sell electronic such as nokia n95,apple…
prist list of electronic

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .