How to configure Windsor to resolve IProcessBus instances

4 views
Skip to first unread message

Robert M.

unread,
Apr 5, 2008, 6:04:30 PM4/5/08
to retlang-dev
Hi Mike,

Do you have any experiences related to configuring Windsor container
in order to resolve IProcessBus instances instead of using
ProcessContextFactory? The work ProcessContextFactory does is pretty
laborious and don't know how to "translate" it into Windsor steps.

Should I continue using ProcessContextFactory together with Windsor? I
have the feeling that IProcessContextFactory was created as default
factory in case that one does not uses a DI container in his app.

Thanks,
Robert

Mike Rettig

unread,
Apr 6, 2008, 11:39:18 AM4/6/08
to retla...@googlegroups.com
I typically use the factory methods provided by ProcessContextFactory with the DI container.

http://codebetter.com/blogs/david.hayden/archive/2007/12/13/factory-method-support-in-castle-windsor-and-spring-net.aspx

Sometimes I use the base implementation directly, while other times I'll wrap the factory with my own implementation to provide logging and monitoring for each context created.

The components themselves don't reference the factory. The IProcessBus is injected through the constructor.

e.g.

public class MyEmailSender{
   public MyEmailSender(IProcessBus bus, IEmailGateway gateway){...}
}

Mike
Reply all
Reply to author
Forward
0 new messages