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: What will happen if function did not commit transaction
PostPosted: Mon Dec 10, 2007 1:23 pm 
Newbie

Joined: Mon Dec 10, 2007 1:01 pm
Posts: 1
Dear Experts,
recently I faced a problem in Hibernate complaining the session is closed whenever I called transaction.commit. Digging on the code, I found the culprit is actually a function (function A) that did not commit its transaction. The problem would occur if I call the function A several times then call another function that involve database update, then the error would occur.

My query here is, even though I resolved the problem by committing the transaction in function A, however, I would like to find out why is it by not 'committing the transaction, I could have the 'session is closed' error?

How is the exact life cycle of the session-transaction are handled in Hibernate?


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.