I haven't been involved in a project based on a fat client for quite some
time now, but I think that if I need to start something from scratch right
now I wouldn't use NH facility; instead I'd use NH own mecanism based on
implementing ICurrentSessionContext and accessing ISessions via
ISessionFactory.GetCurrentSession().
I'd probably take a look at what's in uNhAddins.

2010/11/17 Krzysztof Koźmic <[email protected]>

>  Germán what's your current approach out of curiosity?
>
> Krzysztof
>
>
> On 18/11/2010 12:43 PM, Germán Schuager wrote:
>
> Although I don't use this approach anymore for managing NH sessions, maybe
> you can take some ideas from these posts:
> http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html
> http://blog.schuager.com/2009/03/rich-client-nhibernate-session.html
>
> On Wed, Nov 17, 2010 at 8:13 PM, SimonB 
> <[email protected]>wrote:
>
>> Castle Windsor creates multiple instances of grand child objects using
>> transient lifestyle.
>>
>> I have an object graph:
>> - Object A has a dependency on C1 and C2.
>> - C1 and C2 both have a dependency on GC.
>> - I need C1 and C2 to have the same GS in a given build up.
>>
>> Using StructureMap a single instance of GC is created and passed to
>> both C1 and C2.
>> Using Castle.Windsor a new instance of GC is created for C1 and C2 -
>> ie 2 instances.
>>
>> In my case GS is managing a nHibernate session, and C1 and C2 are
>> repositories used by domain class A.
>>
>> Castle Windsor is returning 2 sessions causing cross session data
>> errors.
>>
>> Does anyone know how to get access to or use the build up context so
>> the instances of child objects can be cached like structure map.
>>
>> Thanks,
>>
>> SB
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Castle Project Users" group.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<castle-project-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" 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/castle-project-users?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to