Search the web
Sign In
New User? Sign Up
nservicebus

Group Information

  • Members: 1232
  • Category: Software
  • Founded: Dec 16, 2007
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Patch for Autofac support   Message List  
Reply Message #1997 of 12980 |
Re: Patch for Autofac support

Thanks to Andreas Öhlund for spotting an issue with the original
version - this updated patch will work with the NHibernate saga
persister and other components which were not targeted with the first
release. The usage remains the same as my initial post below, and a
new version of the build/merge batch scripts are included.

Thanks,
Matt

On Thu, Mar 5, 2009 at 12:29 PM, Matt Burton <matt.burton@...> wrote:
> In case anyone needs it prior to nServiceBus 2.0, here is a patch to
> enable Autofac support today. Here's a quick example:
>
> var builder = new ContainerBuilder();
>
> //saga persistence
>
builder.Register<InMemorySagaPersister>().As<ISagaPersister>().SingletonScoped()\
;
>
> IContainer container = builder.Build();
>
> Configure.With()
>    .AutofacBuilder(container)
>    .MsmqSubscriptionStorage()
>    .Sagas()
>    .XmlSerializer()
>    .MsmqTransport()
>        .IsTransactional(true)
>        .PurgeOnStartup(false)
>    .UnicastBus()
>        .ImpersonateSender(false)
>        .LoadMessageHandlers()
>    .CreateBus()
>    .Start();
>
> Version 1.4.x of Autofac is a requirement, and downloads can be found here:
>
> http://code.google.com/p/autofac/downloads/list
>
> A direct link at the time of this writing would be:
>
> http://autofac.googlecode.com/files/autofac-1.4.1.487.zip
>
> I've also included Autofac-specific build/merge batch files which
> creates a merged version of NSB that is Autofac-specific, in case that
> helps.
>
> Thanks,
> Matt
>


Sat Mar 14, 2009 12:57 am

matt.burton
Offline Offline
Send Email Send Email

Attachment
NServiceBus.ObjectBuilder.Autofac.r2.patch
Type:
application/octet-stream
Message #1997 of 12980 |
Expand Messages Author Sort by Date

In case anyone needs it prior to nServiceBus 2.0, here is a patch to enable Autofac support today. Here's a quick example: var builder = new...
Matt Burton
matt.burton Offline Send Email
Mar 5, 2009
7:29 pm

I've added a link to this post from the contrib site. Thanks -- Udi From: nservicebus@yahoogroups.com [mailto:nservicebus@yahoogroups.com] On Behalf Of Matt...
Udi Dahan
udidahan7 Offline Send Email
Mar 12, 2009
8:49 am

Excellent - thanks! -matt On Thu, Mar 12, 2009 at 1:48 AM, Udi Dahan...
Matt Burton
matt.burton Offline Send Email
Mar 12, 2009
3:29 pm

Hi Matt! I'm currently implementing a builder for structuremap so I have been looking at your code with great interest :) I think you might have a bug in your...
Andreas Öhlund
andreas_ohlund Offline Send Email
Mar 12, 2009
12:36 pm

Andreas - Hi there - this does work because of the way Autofac works internally - each component registration is stored separately along with it's scope...
Matt Burton
matt.burton Offline Send Email
Mar 12, 2009
3:56 pm

Matt! I had a feeling that I was wrong :) What I'm not getting is how your "activation event" is being able to trap the "property set" that occurs after...
Andreas Öhlund
andreas_ohlund Offline Send Email
Mar 12, 2009
7:42 pm

Andreas - The "property set" that happens within the configuration process of nServiceBus is the call to IComponentConfig.ConfigureProperty(string name, object...
Matt Burton
matt.burton Offline Send Email
Mar 12, 2009
8:03 pm

Matt! First, tanks for helping me get my head around this objectbuilder voodoo (sorry Udi couldn't resist:). I wrote a test to highlight what I'm talking...
Andreas Öhlund
andreas_ohlund Offline Send Email
Mar 13, 2009
7:37 am

No worries...alright - looks like you're correct - we don't use the NHibernate persister so this issue never came up. Also - poking through more of the code it...
Matt Burton
matt.burton Offline Send Email
Mar 13, 2009
8:06 am

Nice, that means that I can cancel my reservation for the local mental hospital! :) /Andreas ... ...
Andreas Öhlund
andreas_ohlund Offline Send Email
Mar 13, 2009
8:10 am

Thanks to Andreas Öhlund for spotting an issue with the original version - this updated patch will work with the NHibernate saga persister and other...
Matt Burton
matt.burton Offline Send Email
Mar 14, 2009
12:57 am

Wonderful - updated the link on the contrib site. -- Udi From: nservicebus@yahoogroups.com [mailto:nservicebus@yahoogroups.com] On Behalf Of Matt Burton Sent:...
Udi Dahan
udidahan7 Offline Send Email
Mar 14, 2009
2:07 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help