File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate and Lonmg Sessions" Watch "Hibernate and Lonmg Sessions" New topic
Author

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

Alan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate and Lonmg Sessions
 
Similar Threads
Does committing transaction closes session?
Searching using multiple field
Need Hibernate Criteria help.
Using Hibernate Criteria with an List within my domain object
Need help for Many to Many association