-->
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: StaleStateException vs StaleObjectStateException
PostPosted: Fri Oct 06, 2006 7:55 am 
Newbie

Joined: Thu Sep 21, 2006 9:50 am
Posts: 5
hi,
I'm trying to understand what are the difference between StaleStateException and StaleObjectStateException, but I'm confusing a bit.

I have this situation:
classA 01-----* classB

1) load a1 (instance of classA) in session1. load b17 (instance of classB) in session1. Add b17 to a1.
b17 is removed from db by session2.
associate b17 with a1 and then session1.update()
session1.flush() throw StateStaleException

2) load a1 (instance of classA) in session1.
b2 (instance of classB already associated with a1) is removed in session2.
do some changes on a1 and then session1.update()
session1.flush() not throw any Exception -> OK

3) load b5 in session1.
b5 is removed in session2.
some changes on b5 and then session1.update()
session1.flush() throw StateStaleException

How can I reproduce StaleObjectStateException? or when does it occur?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 07, 2006 5:44 pm 
Newbie

Joined: Thu Sep 21, 2006 9:50 am
Posts: 5
no suggest?


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.