Config For 1.1

8 views
Skip to first unread message

Tim

unread,
Sep 8, 2010, 11:59:39 AM9/8/10
to ncommon
I'm an NCommon 1.0 using giving 1.1 a spin. I'm trying figure out the
new config. Here's what I have:

var sessionSourceGenerator = new
SessionSourceGenerator("logistics.reporting");

var containerAdapter = new
StructureMapContainerAdapter(ObjectFactory.Container);

Configure.Using(containerAdapter)
.ConfigureState<DefaultStateConfiguration>()
.ConfigureUnitOfWork<DefaultUnitOfWorkConfiguration>()
.ConfigureData<NHConfiguration>(x => x.WithSessionFactory(
() => sessionSourceGenerator.SessionSource.SessionFactory)); //
NOTE: SessionSource is from FluentNhib

On the call to Configure, I get a stack overflow exception. Any
ideas?

Also, do I still need to do something like this:

ServiceLocator.SetLocatorProvider(() => new
StructureMapServiceLocator(ObjectFactory.Container));

If so, what needs to be in the container? Thanks.

Ritesh Rao

unread,
Sep 8, 2010, 12:10:00 PM9/8/10
to ncommon
Interesting. What commit version are you using? Are you using binaries
built from the 1.1 master branch? There used to be a Stackoverflow
exception in the StructureMapContainerAdapter which was fixed a while
back in the 1.1 master branch...

Tim

unread,
Sep 8, 2010, 1:50:34 PM9/8/10
to ncommon
Reply all
Reply to author
Forward
0 new messages