Good catch Fabio.

While it won't fix your problem (because you are apparently using web
contextual sessions in a non-web app), why don't you use
CurrentSessionContext to bind and unbind instead of the very specific
ThreadLocalSessionContext?


On Sat, Apr 3, 2010 at 12:16 AM, Fabio Maulo <[email protected]> wrote:

>
>
> 2010/4/2 Jim Geurts <[email protected]>
>
>
>> I'm using NHibernate 3.0.0.4967 with StructureMap.  I don't think that
>> StructureMap is causing the troubles, but I could be wrong.
>> StructureMap stores the ISession object on the local thread (I
>> use .HybridHttpOrThreadLocalScoped() to do so).  Other than storing
>> the session in ThreadLocalSessionContext in my base class constructor,
>> do I have to explicitly tell NH not to look for HttpContext by some
>> other means?
>>
>>
>> Resuming:
> You think that the cause is not StructureMap and you are sending a mail
> here with the stack-trace because you think that the problem is within NH...
> But in this story there are 3 subjects.
> Why you are discarding your self as a possible cause ?
>
> Have a look to the first line of the stack-trace
> NHibernate.Context.WebSessionContext.GetMap()
> Do you have HttpContext.Current in your test ?
> --
> 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]<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 at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to