2 replies Latest Post - ‏2012-06-14T07:34:35Z by Marco_Zuin
2 Posts

Pinned topic Problem DB2 - hibernate - Whith Ur - WebSphere

‏2012-06-12T10:26:56Z |
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();

Test n. 2 :

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

Test n. 3 :

<property name="hibernate.connection.url">jdbc:db2://</property>
<property name="hibernate.connection.datasource">jdbc/dbd</property>
<property name="hibernate.connection.driver_class"></property>
<property name="hibernate.connection.isolation">1</property>

Test n. 4 :

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

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.


Marco Z.
Updated on 2012-06-14T07:34:35Z at 2012-06-14T07:34:35Z by Marco_Zuin
  • krmilligan
    445 Posts

    Re: Problem DB2 - hibernate - Whith Ur - WebSphere

    ‏2012-06-12T15:23:46Z  in response to Marco_Zuin
    Since you're referring to DB9, you'll need to post your question into this forum: