-->
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: How to handle exceptions using "NHibernate Best Practic
PostPosted: Tue Oct 31, 2006 12:56 pm 
Beginner
Beginner

Joined: Wed Jun 28, 2006 2:03 pm
Posts: 22
Hello all... I´m wondering how can I handle exceptions using "NHibernate Best Practices" : http://www.codeproject.com/aspnet/NHibe ... ctices.asp

I mean, the commit occurs only in the end of http request, so I have no control on it....

Help?

ty


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 4:17 am 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
Not a direct answer to your question, but you may want to consider implementing the Unit of Work pattern and changing your FlushMode to Commit Only... This avoid transparent write behind but I prefer it for giving me greater control over when things happen with persistence.
If you look at Billy's code, he catches exceptions to rollback the transaction at least.
I wrap Hibernate exceptions for handling higher up in the layers.

Not sure this helps but maybe another idea.

_________________
If this helped...please remember to rate it!


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.