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].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to