Skip to content

Instantly share code, notes, and snippets.

@wsky
Created July 18, 2012 15:40
Show Gist options
  • Save wsky/3137006 to your computer and use it in GitHub Desktop.
Save wsky/3137006 to your computer and use it in GitHub Desktop.
How to implement Castle.MicroKernel.ComponentActivator.AbstractComponentActivator
public virtual object Create(CreationContext context, Burden burden)
{
var configuration = Model.ExtendedProperties[Constants.SessionFactoryConfiguration] as Configuration;
var f= configuration.BuildSessionFactory();
burden.SetRootInstance(f);//new for 3.x
//onCreation(model, instance);
return f;
}
@wsky
Copy link
Author

wsky commented Jul 18, 2012

Castle.Facilities.NHibernateIntegration.Internal.SessionFactoryActivator实现在castle3.x之后存在此bug

@wsky
Copy link
Author

wsky commented Jul 18, 2012

@wsky
Copy link
Author

wsky commented Jul 18, 2012

"No ISessionFactory implementation associated with the given alias: nh.facility.default"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment