I could think another scenario where customer entity could not have been
updated in web app b...i.e. if your web app is using NH 2nd level cache then
I think until the expiration time you will not get the updated data from DB
even if you use a new session.

Guys correct me if I am wrong.

On Sat, Feb 26, 2011 at 4:01 PM, Fabio Maulo <[email protected]> wrote:

> eh??!?? re-what ?
> Perhaps what you read is about SessionFactory and not Session.
> btw there is no problem, when you will put your app. in production you will
> understand why.
>
>
> On Sat, Feb 26, 2011 at 6:37 AM, Dan B <[email protected]> wrote:
>
>> Someone, somewhere is telling people the session is a singleton. I've
>> seen a couple of answers on SO encouraging this.
>>
>> On Feb 25, 7:21 pm, Oskar Berggren <[email protected]> wrote:
>> > Please tell us you are _not_ using a single ISession instance for the
>> > entire lifetime of your application process. You are likely to have
>> > problems if you do.
>> >
>> > /Oskar
>> >
>> > 2011/2/25 abx <[email protected]>:> Finally I solved the problem!
>> >
>> > > Every web application has his own unit of work, and the nhibernate
>> > > session is managed by the unit of work of the application.
>> >
>> > > Then the unit of work is injected with Unity into the Customer
>> > > repository, so the session was never updated!
>> >
>> > > I solved the problem using the ISession.Refresh every time I need to
>> > > check the Customer's Product.
>> >
>> > > Thanks kor, your help has been very useful to get to the solution!
>> >
>> > > On Feb 25, 2:25 pm, abx <[email protected]> wrote:
>> > >> Good point. I'm checking how my unit of work is managing the session.
>> >
>> > >> On Feb 25, 12:41 pm, kor <[email protected]> wrote:
>> >
>> > >> > ISession is created before calling ISession.BeginTransaction() ?
>> >
>> > > --
>> > > 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 athttp://
>> 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.
>>
>>
>
>
> --
> 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.
>

-- 
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