-->
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: hibernate.connection.isolation property value dosent work
PostPosted: Mon Jun 20, 2011 1:27 pm 
Newbie

Joined: Mon Jun 20, 2011 12:50 pm
Posts: 1
We use hibernate.3.1.3 with DB2.

We want to use the TRANSACTION_READ_UNCOMMITTED isolation level. We set the transaction isolation level as <property name=" hibernate.connection.isolation">1</property> in Hibernate.cfg.xml as below.

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>

<property name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name=" hibernate.connection.isolation">1</property>
<property name="hibernate.max_fetch_depth">1</property>
<property name="show_sql">false</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>

<mapping resource="ormmapping/com/test/testing.hbm.xml"/>

</session-factory>
</hibernate-configuration>

In java code when we print the transaction isolation level we get the default isolation level that is 4.
sessionFactory = config.buildSessionFactory();
Session hbmsession = sessionFactory.getCurrentSession();
System.out.println("isolation level :"+hbmSession.connection().getTransactionIsolation());

It is not picking the hibernate.connection.isolation property value mentioned in Hibernate.cfg.xml .

Please advise if anything else need to be done.

Quick response is appriciated.

Thanks in advance.


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.