I'm not sure if OSIV is the same as session per view, but I would
stick with what NH provides out of the box. you still control the
scope of the session using option 1 as you will control where to open/
dispose of the session. Option 2 seems redundant since it already
exists in option 1. Options 3 and 4 require dependencies on additional
frameworks built on top of NH and only complicate the model for
managing session.

the fewer moving parts the easier it is to maintain. so sticking with
ManagedWebSessionContext, session per view, and the Post-Redirect-Get
model I haven't had any issues with NH in the web environment.

As for long conversations; I just don't use them. Instead I use
intermediate dtos stored in session. in the final stage I will commit
all the changes. This way I still keep the session per request and I
don't need to manage session or proxies across multiple requests.

On Nov 9, 4:21 am, Billy Stack <[email protected]> wrote:
> Hi all,
>
> I require to implement OpenSessionInView in my project. I see there
> there are really the following options at a high level:
>
>         1. Use NHibernate.Context.ManagedWebSessionContext (inbuilt 
> NHibernate option)
>         2. Write your own...
>         3. Use third party options such as S#arp...
>         4. Use NHibernate Burrow.
>
> The question I have is which is the best option to go for if using
> OpenSessionInView? -
> Im thinking that Burrow is the way to go here as it uses
> OpenSessionInView by default, although I will not require "long"
> conversation spanning across multiple http requests.
>
> Is there any example of Burrow using OpenSessionInView pattern out there?
>
> Cheers,
> Billy Stack
--~--~---------~--~----~------------~-------~--~----~
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