new RhinoServiceBusConfiguration().UseCastleWindsor(_container).Configure();
On Thu, Sep 22, 2011 at 4:21 PM, Juan Agüí <[email protected]> wrote: > Hi Corey, > > this is what I have: > > in global.asax > private readonly IWindsorContainer _container; > > public MvcApplication() > { > _container = new WindsorContainer(new XmlInterpreter()); > new RhinoServiceBusConfiguration().UseCastleWindsor(); > _container.Install(new MyWindsorInstaller()); > } > > in MyWindsorInstaller > public void Install(Castle.Windsor.IWindsorContainer > container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore > store) > { > container.Register(Component > > .For<HomeController>().LifeStyle.PerWebRequest.ImplementedBy<HomeController>()); > } > in HomeController > public HomeController(IServiceBus bus) > > Unfortunately I'm getting the following exception: > > Can't create component 'ElCarteroWebRole.Controllers.HomeController' > as it has dependencies to be satisfied. > ElCarteroWebRole.Controllers.HomeController is waiting for the > following dependencies: > > Services: > - Rhino.ServiceBus.IServiceBus which was not registered. > > Hence it looks like I'm failing to register the bus to IServiceBus in > Windsor. I thought RhinoServiceBusConfiguration will handle this, but > I'm obviously wrong. What am I missing? > > Thanks! > > On Thu, Sep 22, 2011 at 1:27 AM, Corey Kaylor <[email protected]> wrote: > > > > Assuming you already use Windsor and have some bootstrapping code to wire > things up. The configuration code should be very similar to what you find in > most of the unit tests. Here's an example. > > > > > https://github.com/hibernating-rhinos/rhino-esb/blob/master/Rhino.ServiceBus.Tests/BusSubscriptionTests.cs#L20 > > > > On Wed, Sep 21, 2011 at 4:24 PM, juan agui <[email protected]> wrote: > >> > >> Hi guys, > >> > >> I wonder if someone would share some code/pointers for registering RSB > >> with Castle.Windsor in an asp.net MVC web . Bottom line is having my > >> controllers injected with the bus dependency > >> > >> NB: I tried using the Alexandria sample stuff, but its > >> Rhino.ServiceBus looks somewhat outdated. > >> > >> Thanks, > >> Juan > >> > >> -- > >> 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. > >> > > > > -- > > 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. > > -- > 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. > > -- 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.
