Hi, Sure here is a link to filesanywhere http://goo.gl/xj6uz download example.zip. It has uncommented code for windsor which fails and commented out for structuremap which works.
The reason I'm not using windsor to create a proxy is that I agree to use proxies populated by container if such proxies are DECORATING proxies like profiling, transaction demarcation, logging; but in my case I create proxies to stub remoting so such factory shouldn't be bound to container in any way I belive. On Aug 30, 11:35 pm, Krzysztof Koźmic <[email protected]> wrote: > Nick, > > Can you provide a failing test?? Why are you not relying on Windsor to > create the proxies for you?? > > Krzysztof > > On 30/08/2011 9:28 AM, Nick Evgeniev wrote: > > > > > > > > > Hi, > > > I've a small problem (or missunderstanding may be): > > > the following code > > container.Register( > > ...., > > Component.For<Iface>().UsingFactoryMethod(() => > > Factory.create<Iface>()), > > ); > > container.Resolve<Iface>(); > > > works just fine if Factory creates real classes, but fails with > > nullpointer exceptions if factory creates dynamic proxies for > > interfaces. what am I doing wrong? Why it fails? > > What is the right way to do such things in windsor? > > > I would like to avoid put such knowledge in configuration (whether > > factory creates real classes or proxies) as all the abstraction will > > just disappear. -- 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.
