I would like to use prototype interceptors instead of a singleton interceptor so each session would get a new interceptor instance.
I looked into the HibernateTransactionManager Class and I think "EntityInterceptorObjectName" and "ObjectFactory" are the properties I have to set.
While EntityInterceptorObjectName is pretty obvious, I have no clue how to reference the ObjectFactory when it's the "mother of the ObjectFactories", e.g. the same ObjectFactory which creates the AppContext/the HibernateTransactionManager.
The relevant part of the config:
<object id="HibernateTransactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
<property name="DbProvider" ref="DbProvider"/>
<property name="SessionFactory" ref="SessionFactory"/>
<!-- the name of my non-Singleton EntityInterceptor-->
<property name="EntityInterceptorObjectName" value="MyPrototypeEntityInterceptor" />
<!-- What should I put as ref here? -->
<property name="ObjectFactory" ref="" />
</object>
<object id="MyPrototypeEntityInterceptor" type="Hib.EntityInterceptor, Hib.Interceptors" singleton="false">
</object>