Juan -

>From the bits we've seen it seems like you have all the required
pieces, but something is amiss if you can't resolve the bus as Corey
suggested. Would you mind posting your Global.asax code? (you could
make it available as a Gist on GitHub or use a service like pastie.org
to link to it and then take it down later) Perhaps by seeing it we'll
be able to help you diagnose the issue better.

Thanks,
Matt

On Tue, Sep 27, 2011 at 4:55 AM, Juan Agüí <[email protected]> wrote:
> Not really:
>
> var bus = _container.Resolve<IServiceBus>(); yields a
> [ComponentNotFoundException: No component for supporting the service
> Rhino.ServiceBus.IServiceBus was found]
>
>
> On Mon, Sep 26, 2011 at 4:34 PM, Corey Kaylor <[email protected]> wrote:
>> In the line right after you call .Configure can you resolve the IServiceBus
>> there?
>>
>> On Mon, Sep 26, 2011 at 2:43 AM, Juan Agüí <[email protected]> wrote:
>>>
>>> Hi Matt,
>>>
>>> yes, in my global.asax
>>>
>>>  protected void Application_Start()
>>>        {
>>> -->            ControllerBuilder.Current.SetControllerFactory(new
>>> WindsorControllerFactory(_container));
>>>
>>>
>>> I was expecting that this line new
>>> RhinoServiceBusConfiguration().UseCastleWindsor(_container).Configure();
>>> would register IServiceBus in the container but it looks like I'm
>>> missing something. My controllerfactory knows how to resolve
>>> HomeController, but it
>>> can't resolve IServiceBus
>>>
>>> Thanks,
>>> Juan
>>>
>>> On Fri, Sep 23, 2011 at 4:37 PM, Matt Burton <[email protected]>
>>> wrote:
>>> > 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.
>>> >
>>> >
>>>
>>> --
>>> 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