This is actually an answer to fellow blogger Jak Charlton, but I see a benefit in sharing it.
Casey pointed out that the default lifestyle should be transient. Even though I understand his reasonings, I am used to this way.
There is a solution for those who wants Transient as the default.
You know what? Yes, the events ! Here is how.
container.Kernel.ComponentModelCreated += new ComponentModelDelegate(Kernel_ComponentModelCreated);
void Kernel_ComponentModelCreated(Castle.Core.ComponentModel model)
{
if (model.LifestyleType == LifestyleType.Undefined)
model.LifestyleType = LifestyleType.Transient;
}
493ba43c-3860-425e-b486-feddee4afa5e|0|.0
castle, windsor, microkernel