Great, I'll go with that!

On May 11, 2:21 pm, John Davidson <[email protected]> wrote:
> You need to watch how you use the finally clause carefully. After a
> successful transaction you want to do a  transaction commit, a session flush
> and then a session close (assuming a web environment - in other environment
> the close may not be required). After a failed transaction you want to do a
> transaction rollback and then a session close (always).
>
> John Davidson
>
>
>
>
>
> On Tue, May 11, 2010 at 9:01 AM, robinsonpr <[email protected]> wrote:
> > Thanks John that's much appreciated.
>
> > I've found it hard to find best practice and "the right way" to do
> > things with nHibernate (I am new to it in case you didn't guess!).
>
> > So I don't need to do the session close in a finally block around all
> > my operations?  Just in the catch after the rollback?
>
> > Paul
>
> > On May 11, 1:38 pm, John Davidson <[email protected]> wrote:
> > > You must close the session, without a flush, after a rollback.
>
> > > John Davidson
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected]­>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/nhusers?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to