I would prefer if the order of the calls changed :) It would have provided the hooks for bootstrapper to: a) change facility configuration b) register IBusConfigurationAware instances (to get the configuration further on)
Just curious, what particularly prevented you from going along this path? On Jun 14, 10:38 pm, Simone Busoli <[email protected]> wrote: > I don't know the internals of the microkernel enough to tell if adding an > IConfiguration instance to the kernel is the only way to configure the > facility. I noticed that when the facility is registered if its > configuration wasn't in the kernel already then an exception is thrown, > therefore the point is to be able to add the configuration to the kernel > _before_ the facility is registered, which at the moment is not possible > since ConfigureBusFacility is called before you have a reference to the > container while ConfigureContainer (I don't remember if it's called like > that exactly) after the facility has already been added. I had already > changed the order of the calls so that you could have a reference to the > container before the facility was added - so that you could really configure > it - but then I wasn't sure about that and went down the HostConfiguration > path, which I don't like very much either, actually. > > > > On Sun, Jun 14, 2009 at 12:55, Vadimmer <[email protected]> wrote: > > > :) Happens i should update more frequently > > But it still seems that there's no possibility to change (or use) the > > host configuration from the bootstrapper without calling directly to > > container.Kernel.ConfigurationStore. Do I miss something? > > > I ended up with dirty hack: > > i remember the reference to the RSBFacility in ConfigureBusFacility > > and then reuse it in AfterStart :) > > > On Jun 14, 5:04 am, Simone Busoli <[email protected]> wrote: > > > I went down that route at the beginning, then added the HostConfiguration > > > class which can be used to configure the facility before it's added to > > the > > > container. Have a look at the Starbucks example to see how it's used. > > > > On Sat, Jun 13, 2009 at 23:39, Vadimmer <[email protected]> wrote: > > > > > I tried to get the thread count in my custom bootstrapper. > > > > Haven't found any way to register my bootstrapper instance as > > > > IBusConfigurationAware in the default host's container. > > > > > Couldn't find a way to access the default host's container before the > > > > RSB facility is added (and therefore IBusConfiguration instances are > > > > notified). > > > > > I would be pleased to hear, if I missed something :) > > > > > If not :), the root of this all is, I believe, in these lines: > > > > > var facility = new RhinoServiceBusFacility(); > > > > bootStrapper.ConfigureBusFacility(facility); > > > > container.Kernel.AddFacility("rhino.esb", facility); > > > > > I'd suggest the default host called InitializeContainer before the > > > > adding of the facility. > > > > > What do you think of this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
