-->
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: rollback after ObjectDeletedException leaves session broken
PostPosted: Tue Oct 12, 2004 8:48 am 
Regular
Regular

Joined: Tue Jan 27, 2004 12:22 pm
Posts: 103
Hibernate version: Hibernate 2.1.4

Name and version of the database you are using:HSQLDB server 1.7.1 is running

When I want to remove an object through session.delete(obj) and it's still associated in my application Hibernate throws an Exception (net.sf.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade). This is exactly what I want, because then I do a rollback on the transaction and I can tell the user the object can't be removed. But the problem is: on the next flush of the session the exception keeps comming back and makes the session unusable. Please help me to resolve this issue.
transaction.rollBack finishes succesful and wasRolledBack returns true.

By design I use a single session per application. This is because I use alot MVC in the GUI and thus require the same objects throughout my application.

_________________
Dencel
- The sun has never seen a shadow -


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.