-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Transaction Isolation Level config doesn't work?
PostPosted: Thu Apr 05, 2007 5:55 pm 
Beginner
Beginner

Joined: Wed Apr 05, 2006 8:16 pm
Posts: 20
Hi,

I am not sure if I am doing something wrong? I am programmatically configuring the transaction isolation level:

cfg.setProperty(Environment.ISOLATION, String
.valueOf(Connection.TRANSACTION_READ_UNCOMMITTED));

For when we create our Hibernate Sessions, but then when I call

session.connection().getTransactionIsolation() on my session during use, it still says "repeatable read".

If I actually set the transaction isolation level directly on the connection, it sticks, like if I do this:

session.connection().setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);

return session;

Then it works. My first question is -- Is there another way than what we have tried to use Hibernate configuration to set the transaction isolation level? Or are we doing something wrong? (We are using 3.0.5)

Another question we have is -- during the course of a single hibernate session, does that session manage one and only one connection, or is it possible that calling

session.connection();

Would return us a different connection within the context of the same session under some circumstances?

Thanks in advance for anyone who can help us! ,

Jim Bender


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.