-->
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: Optemistic Lock Strategy
PostPosted: Fri Jan 16, 2009 5:06 am 
Newbie

Joined: Fri Jan 16, 2009 4:54 am
Posts: 2
Hibernate version:
Hibernate 3

I have implemented optimistic lock (version) strategy an it works.
But how can I resolve the collison after the Stale... Exception.

I have some strategies. One is to ignore the exyecption an override
the actual database record. But how can I do this ?

First I have set the version attribute in the stale object to the actual object
and call session.saveOrUpdate(). But I got the execption again.

The I have refresh the stale object, session.refresh() but I got the
stale exception.

Also session. replicate does not work ?


How can I resolve the collison in hibernate.

The solution is not to close the session and load all the date new, because
I have a long conversation.

Best Regards
michael


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.