Are you overriding the default controller factory (or dependency
resolver in MVC 3) in your application and using a Castle-specific
one? If so you need to share the same container instance that you're
building with that, then your controller dependencies will be
satisfied.

On Fri, Sep 23, 2011 at 1:14 AM, Juan Agüí <[email protected]> wrote:
> Still the same error. Maybe I'm missing something in my web.config?
>
> <configuration>
>  <configSections>
>    <section name="castle"
> type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,
> Castle.Windsor" />
>    <section name="rhino.esb"
> type="Rhino.ServiceBus.Config.BusConfigurationSection,
> Rhino.ServiceBus"/>
>  </configSections>
>  <rhino.esb>
>    <bus threadCount="1"
>         numberOfRetries="5"
>         endpoint="rhino.queues://localhost/test_queue"
>         queueIsolationLevel="ReadCommitted"
>         name="mybus"
>             />
>    <messages>
>      <add name="Rhino.ServiceBus.Tests"
>           endpoint="msmq://localhost/test_queue"/>
>      <add name="Rhino.ServiceBus.Tests"
>           endpoint="msmq://localhost/test_queue2"/>
>    </messages>
>  </rhino.esb>
>  <castle/>
>
> Thanks!
>
>
> On Fri, Sep 23, 2011 at 12:53 AM, Corey Kaylor <[email protected]> wrote:
>> 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.
>>
>
> --
> 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.

Reply via email to