graphicsxp I'm having the same problem. You could solve?

On Tuesday, April 21, 2009 10:49:57 AM UTC-3, graphicsxp wrote:
>
> I keep replying to myself... sorry :p 
>
>  CurrentSessionContext.Bind() was the missing link !   I'ts working 
> now.. 
>
> Could someone confirm that thread_static is the correct context class 
> I should use ? Actually I've lied when saying I was using a console 
> app, I'm using a WCF service in fact. Is it still ok to use this 
> context class ? 
>
> Thanks 
>
> On 21 Apr, 14:43, graphicsxp <[email protected]> wrote: 
> > Ha actually I've changed  my property to : 
> > 
> > <property name="current_session_context_class">thread_static</ 
> > property> 
> > 
> > Now I get a different error : 
> > 
> > No session bound to the current context 
> > 
> > I guess there's still something wrong then. But I feel I've made some 
> > progress, do you know what's missing ? 
> > 
> > On 21 Apr, 14:35, graphicsxp <[email protected]> wrote: 
> > 
> > > What do I use to open the downloaded file ? There's no file 
> > > extension... 
> > 
> > > Anyway, I thought NH would provide the necessary context to share my 
> > > session across dao's, am I wrong ? 
> > 
> > > On 21 Apr, 14:09, Gustavo Ringel <[email protected]> wrote: 
> > 
> > > > Take a look on uNHAddins sessionEasier. 
> > 
> > > > On Tue, Apr 21, 2009 at 3:55 PM, graphicsxp <
> [email protected]>wrote: 
> > 
> > > > > 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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to