-->
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.  [ 4 posts ] 
Author Message
 Post subject: Update fails - Statement is not closed
PostPosted: Mon Sep 27, 2004 11:39 am 
Newbie

Joined: Tue May 25, 2004 4:24 am
Posts: 13
Recently we have integrated Hibernate into our product.
While moving our value objects to use the persistence layer of Hibernate,
We encounter the following problem.

The update operation is stuck. The query is created and the values are bound.
However the PreparedStatement is not closed (unlike in the insert method scenario) and the flush is not called.
See the code snippet below.

Session session = getHibernateSession();
session.update(myObject); <--------STUCK-------------

session.flush();
connectionMgr.commitTransaction(); < ----We manage the connection
session.close();


I attach the last log statements



Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 27, 2004 12:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It's extremely unlikely that anyone will be able to help you solve such a problem via the forum, it is waaaay too specific to your particular environment, and infrastructure, and customized txn management layer.

What you'll need to do, is simplify your code and isolate the problem. Eliminate things one by one.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 27, 2004 12:55 pm 
Newbie

Joined: Tue May 25, 2004 4:24 am
Posts: 13
Sure...so let me rephrase ...

Are you familiar with other cases where a certain operation halts
after binding the values to the query parameters? If so what were the causes ?

Thanks in advance,
Daphna


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 27, 2004 5:02 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
Are you REALLY sure it doesn't call flush, even implicitly inside the update() ( not sure if this ever happens ). Debug the hibernate code to see, sometimes flush gets called at unexpected times.

Anyways best guess is that you are getting a locking issue in the database. Something else may have taken a read lock or higher out on the row/page/table you are trying to update. SQLServer would exhibit this behaviour if a lock is blocking an operation.

If it is definately not hitting the db via flush() or otherwise I really don't know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.