I have spent some time on this over the weekend and I have come up with what
I consider a decent approach to solving this problem. Rather than
abstracting away the container there are very simple hooks to say what you
want. Instead of inheriting from AbstractBootStrapper you will inherit from
a container specific bootstrapper. If you do not use a boostrappper
currently there is a hook in the configuration that looks like the sample
below. Disadvantages is that each container must wire up things
appropriately by implementing IBusConfigurationAware where appropriate.
However, after doing this with Windsor it is pretty trivial to do so not
much of a disadvantage in my opinion. Going this route also seems the least
likely to impact people from the changes. I have 13 remaining tests to work
through, but it's going much quicker now that I have some direction. I plan
to have a StructureMap implementation before the end of the week. Any other
containers for now will only be provided by pull requests from others that
need one. Once I have all the tests passing again I will push a branch for
everyone to review and give feedback on.

var container = new WindsorContainer();
            new RhinoServiceBusFacility() //name will change
                .UseCastleWindsor(container)
                .UseStandaloneConfigurationFile("BusWithLogging.config")
                .Configure();

<configuration>
  <configSections>
    <section name="rhino.esb"
type="Rhino.ServiceBus.Config.BusConfigurationSection,
Rhino.ServiceBus"/>
  </configSections>
  <rhino.esb>
       <bus threadCount="1"
           numberOfRetries="5"
           logEndpoint="msmq://localhost/test_queue2"
           endpoint="msmq://localhost/test_queue"/>
    <messages>
      <add name="Rhino.ServiceBus.Tests"
           endpoint="msmq://localhost/test_queue"/>
    </messages>
  </rhino.esb>
</configuration>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to rhino-tools-...@googlegroups.com.
To unsubscribe from this group, send email to 
rhino-tools-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to