in NHibernateUnitOfWorkFactory

if (IoC.Container.Kernel.HasComponent(typeof(IInterceptor)))
{
   IInterceptor interceptor = IoC.Resolve<IInterceptor>();
   ...

If the IInterceptor is set up in the windsor config with the default
implementation it will be a singleton. When OpenSession is called in
NHibernate it will:

if (sessionLocalInterceptor != null)
{
   sessionLocalInterceptor.SetSession(session);
}

So if we have more than one session open at once - easy to do for a web app
- we could be causing a clobbering of the session stored in the interceptor
right?

If so, do you recommend that you

 #1 Use UnitOfWork.CurrentSession instead of relying on SetSession() with a
local var
 #2 Set up the lifestyle of the Interceptor to be something other than
singleton, and if so what?

 - Will

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" 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/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to