This was an oversight and I can change this in the next Nuget push.

On Thu, Dec 15, 2011 at 5:11 AM, dillenmeister <[email protected]>wrote:

> If you override BeforeStart in your bootstrapper and don't call
> base.BeforeStart() the bus will not be configured.
>
> For example:
>
>        public class MyBootstrapper : StructureMapBootStrapper
>        {
>                public override void BeforeStart()
>                {
>                        ImportantThingsToDoBeforeTheBusStarts();
>                }
>        }
>
> You will get an exception later on when the bus is about to start.
> For  StructureMapBootstrapper this exception will be thrown:
> StructureMap Exception Code:  202
> No Default Instance defined for PluginFamily
> Rhino.ServiceBus.Internal.IStartable, Rhino.ServiceBus,
> Version=2.2.2.0, Culture=neutral, PublicKeyToken=0b3305902db7183f
>
> The reason is that the AbstractBootStrapper actually has some
> important code in its BeforeStart-method:
>
>        public virtual void BeforeStart()
>        {
>            config.Configure();
>        }
>
> So, to fix it you can just call base.BeforeStart():
>
>        public class MyBootstrapper : StructureMapBootStrapper
>        {
>                public override void BeforeStart()
>                {
>                        ImportantThingsToDoBeforeTheBusStarts();
>                        base.BeforeStart();
>                }
>        }
>
> I spent some time debugging this since it was not obvious that the
> structuremap exception that was thrown had anything to do with me
> overriding BeforeStart(). I don't know the codebase well enough to
> suggest exactly how to make this better, but it would be nice if you
> did not have to call base.BeforeStart()...
>
> --
> 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