Basically I'm trying to share the same session across all my DAO's by using GetCurrentSession of the SessionFactory object.
It's a console application, so what should I do to get this to work ?? On 21 Apr, 13:40, graphicsxp <[email protected]> wrote: > ha yes sorry, I got that from somewhere on the web, but I wasn't sure > what I was doing. > > I found that there are built-in current session-context > implementations in nhibernate : > > Call > thread_static > Web > > if I do <property name="current_session_context_class">Call</ > property> , I still get the same exception.... What should I do ? > > On 21 Apr, 13:32, Ken Egozi <[email protected]> wrote: > > > is "thread" a class? > > > if not, you should either locate or implement a class, that can supply a > > current context based on thread. > > > On Tue, Apr 21, 2009 at 2:44 PM, graphicsxp > > <[email protected]>wrote: > > > > I'm getting this exception: > > > > No CurrentSessionContext configured (set the property > > > current_session_context_class) > > > > when doing : mySessionFactory.GetCurrentSession(); > > > > In my hibernate.cfg.xml I've added the property : > > > > <property name="current_session_context_class">thread</property> > > > > But I still get the exception.... I there something I've missed ? > > > > Thanks > > > -- > > Ken > > Egozi.http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
