i have this problem too, as a matter of fact , i have no clue about what session-per-request and session-per-conversation is !! would you please light me up ?
On Apr 6, 10:58 pm, Fabio Maulo <[email protected]> wrote: > Which strategy of nh-session you need ?session-per-request ? > session-per-conversation ? > CpBT ? > > 2009/4/6 hursting <[email protected]> > > > > > > > Good afternoon everyone. I have started using NHibernate in one of my > > projects and I guess so far so good apart from some minor issues. > > However discovered this issue today which i have been reading up on. > > The link below describes the same issue that i am having. I am > > implementing the session management through a thread safe singleton. > > As the link below indicates there seems to be a problem when storing > > collections in asp sesssion and then using an object from the cachec > > collection later on a different on page. > > >http://dotnettricks.com/blogs/craigbowesblog/archive/2007/09/03/686.aspx > > > So what to do. Here what I have been thinking so I guess am looking > > for feedback from you > > > 1. Make a copy of the object and use that. > > 2. Explicitly close the connection after each query but not sure what > > this will do performance wise > > 3. Break the object sesssion state as suggested by Craig in his link > > and then update the object. The trouble with this approach is that > > most people will want to maintain a reference to the NHibernate dll in > > the data layer only and abstract the crud operations from the layers > > above. > > > I tried cloning the object and performing the crud operations on it > > and this worked. I also explicitly closed the connection when i > > brought back the IList collection and this worked as well. Was > > wondering which operation is best and how have other people got around > > this problem > > > Regards Ciaran > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
