Hibernate Books

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 - Whith Ur - WebSphere - Problem DB2
PostPosted: Thu Jun 14, 2012 6:28 am 
Newbie

Joined: Thu Jun 14, 2012 6:04 am
Posts: 1
Good morning.
Sorry little English spoken.
After 5 days I look for in all the various posts and forums, I thought I'd ask all of you.
I'm currently using J2EE, hibernate 3.6.10, websphere 6.1 and DB2 9. I have to retrieve the log tables from hibernate and db2 using criteria. Are normal SELECT query. Each time you run the query, it makes me a LOCK ESCALATION on the table.
I tell you the test I have done to be able to run a query with the WITH UR:

Test n. 1 :

Session session = HibernateUtil.getSessionfactorydb2().getCurrentSession();
session.setDefaultReadOnly(true);

Test n. 2 :

Criteria crit = session.createCriteria(NameTable.class);
crit.setReadOnly(true);

Test n. 3 :

<hibernate-configuration>
<session-factory>
...
<property name="hibernate.connection.url">jdbc:db2://xx.xx.xx.xxx:448/DBD</property>
<property name="hibernate.connection.datasource">jdbc/dbd</property>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.isolation">1</property>
...
</session-factory>
</hibernate-configuration>

Test n. 4 :

<hibernate-mapping package="it.xx.wl.jmcconsole.web.applicationdata.hostlog.hbm">
<class name="nameTable" table="xxx" mutable="false">
...
</class>
</hibernate>

I've never managed to remove the property LOCK ESCALATION from the table.

To be able to remove the LOCK ESCALATION I had to step in configuring datasource in websphere, adding the property "webSphereDefaultIsolationLevel" equal to 1 and the property "readOnly" equal to true. How do I remove the LOCK ESCALATION without resorting to the websphere modest?
If anyone knows how to help me.

Thanks


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.