-->
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 Long Row Locking Times, Container Managed Sessions
PostPosted: Fri Sep 26, 2014 2:36 pm 
Newbie

Joined: Fri Sep 26, 2014 2:24 pm
Posts: 1
Hello,
I am currently supporting an application that uses Hibernate 3.5 and JBoss 5.1.0. The system is set up to use container managed sessions so jBoss is handling our session scope for us. We are using Oracle 10 and 11 Databases.

I've noticed that when we search for a single row and lock it pessimistically using sess.lock(object,LockMode.UPGRADE) it generates a SELECT..FOR UPDATE statement which produces a lock on a row in the table. However, when we later update that row, the lock is not removed. Instead it isn't until our application has gone through the complete render cycle (jsp render) and the session is closed by JBoss that the lock is released.

I have tried using sess.lock(object,LockMode.NONE), sess.getTransaction().commit() and many other methods but I cannot get the lock to release before the session is closed. Is this a limitation of container managed transactions? Should I be using bean managed transactions in this case?

Any feedback is appreciated. 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.