File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate and Lonmg Sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate and Lonmg Sessions" Watch "Hibernate and Lonmg Sessions" New topic

Hibernate and Lonmg Sessions

Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89
Hi Guys

I have a hibernate session that executes a stored procedure, call a few named queries some of which are selects and updates and I use the criteria API aswell. The same handful of tables are either been selected or updated in the session. I have the code all in between a session.beginTransaction() and a commit. But the code hangs due to database locking tables. I need to execute code do selects on the dirty data which may need a further update. And then commit the lot. The only way I can get a stuff to work is commit at different points. I do not want to do this. Any advice?

Its the criteria API that hangs. I have set autocommit to be be off and set transaction isolation to read uncommiitted

subject: Hibernate and Lonmg Sessions
It's not a secret anymore!