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
|