Applying Spring.Net HibernateTemplate Guidelines
I have a class for auditing:
public class AuditAfterAdvise : IAfterReturningAdvice
This is applied to the Dao class in my Spring.Net configuration using RegularExpressionMethodPointcutAdvisor.
The Dao class implementation calls HibernateTemplate.SaveOrUpdate (object object) to commit the changes.
I would like to apply the AuditAfterAdvise class to the HibernateTemplate SaveOrUpdate () method used in my Dao, not to the methods of Dao itself.
NHibenate / Spring setup should use LocalSessionFactoryObject for Dao. Is it possible?
Thanks.
a source to share
This should certainly be possible.
Instead of setting Tao, add a tip to the object definition for the LocalSessionFactoryObject. RegularExpressionPointCutAdvisor should continue to work - just applied to another object.
I am assuming the HibernateTemplate is being retrieved from the Spring.NET factory object ...
a source to share