-->
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.  [ 2 posts ] 
Author Message
 Post subject: refresh() in conversations
PostPosted: Wed Nov 18, 2009 5:16 pm 
Newbie

Joined: Wed Nov 18, 2009 4:47 pm
Posts: 2
1. The API Javadoc for refresh() warns that using the session.refresh() method to maintain long conversations is not recommended. Why not? What are the main concerns?

2. I intend to use refresh() conversationally, though I doubt the conversations will be all that long. Basically, to reattach to an entity that is backing a table-row (or any other control), if the application user selects its values from the table for editing.

This strikes me as less risky than using update() or a merge() -- there is a possibility that the database may be directly updated through another application not using hibernate. I do not want to overwrite or lose those changes, slight as the possibility seems.

Even if you think I should be using a different strategy for 2. (like optimistic concurrency with versioning) I would still like to know the specific reasoning behind 1., the Javadoc warning.


Top
 Profile  
 
 Post subject: Re: refresh() in conversations
PostPosted: Wed Nov 18, 2009 5:22 pm 
Newbie

Joined: Wed Nov 18, 2009 4:47 pm
Posts: 2
Actually, the API doc refers to long running sessions, not conversations.
Still, the question remains.
(the topic author)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.