-->
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: Optimistic Locking exception
PostPosted: Mon Dec 11, 2006 10:22 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Hi,
I am writing some tests for optimistic locking using the Hibernate Entity Manager.

Thread 1, kicks up and begins updating an Entity.
Before it commits, Thread 2 spawns and updates the same Entity.
When Thread 1 attempts to commit, I get a org.hibernate.StaleObjectStateException, all fair enough.

However, I am just looking throught the Java Persistence API and I am wondering when does an
javax.persistence.OptimisticLockException get thrown?


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.