Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: What is the correct way to rollback?
PostPosted: Tue Sep 23, 2003 3:13 pm 
Expert
Expert

Joined: Tue Sep 16, 2003 4:06 pm
Posts: 318
Location: St. Petersburg, Russia
Can I just rollback() JDBC connection or this will make some internal state of the session inconsistent?
Can I flush() + rollback()?

I assume session.close().rollback() is 100% working solution but I just do not want to close and re-open session.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2003 4:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No. I think what you really want is savepoints. Its actually reasonably easy to add this feature to Hibernate. (As a hack solution, you could serialize the session and then deserialize it from rollback.)

Just chatting with Christian and David here, we're not really convinced that savepoints are such a great thing.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.