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.  [ 3 posts ] 
Author Message
 Post subject: Rollback does not work when used before a SELECT
PostPosted: Wed Jan 31, 2007 4:12 pm 
Senior
Senior

Joined: Fri Jan 13, 2006 2:50 pm
Posts: 123
Location: Blumenau / SC / Brasil
Hi.

NH Version = 1.2.0
.NET = 2.0

I'm trying to save a master/detail relationship. When I get an exception, I call transaction.Rollback(). Ok, that's right!

But after the Rollback(), I call Server.Transfer() and the Page_Load calls an HQL SELECT COUNT command. At this momment, the data Rollbacked before are persisted!

Is it normal? Note that calling Server.Transfer(), the same session that is used to exec the RollBack is used to exec the SQL (I use the pattern Session Per Request).

It seems strange.

Bye.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 31, 2007 5:03 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
If you are rolling back a transaction, you should not use the session anymore, only close it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 7:34 am 
Senior
Senior

Joined: Fri Jan 13, 2006 2:50 pm
Posts: 123
Location: Blumenau / SC / Brasil
Ok man, if you say, it's said! :P

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.