-->
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: version rollback on transaction.rollback() error
PostPosted: Wed Oct 06, 2004 10:32 am 
Newbie

Joined: Tue Apr 13, 2004 6:41 am
Posts: 19
Hibernate version: 2.1.6

It looks like that hibernate does not rollback version of object when it fails...

I am using optimistic-lock="version" class mapping strategy to determine if instance is new. What happens is that if .commit() fails and I do tx.rollback() version values are not reverted back, so I can not use these instances anymore, because version information for them is incorrect!!!

Is this bug or feature???

Documentation does not say that instance become invalid when tx.commit() fails, it just says that session becomes invalid and it is necessary to do rollback()...

Rihards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 07, 2004 7:29 am 
Newbie

Joined: Tue Apr 13, 2004 6:41 am
Posts: 19
so it is bug or not? for it looks like it is, because I can not actualy use these objects anymore, because of invalid version information...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2004 4:25 am 
Newbie

Joined: Tue Apr 13, 2004 6:41 am
Posts: 19
hello?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2004 10:52 am 
Newbie

Joined: Tue Sep 21, 2004 5:00 am
Posts: 4
Location: Munich
I think you should say which transaction manager you are using. For example, if you are using the JDBC transaction manager, then Hibernate just calls rollback() on the JDBC connection. So it should not matter what Hibernate does - it shouldn't get through to the database.

_________________
Richard


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.