Nibernate, DynamicProxy, and Spring AOP
Posted
by jeff
on Stack Overflow
See other posts from Stack Overflow
or by jeff
Published on 2010-05-13T05:21:39Z
Indexed on
2010/05/13
5:24 UTC
Read the original article
Hit count: 331
nhibernate
|proxy
We have an Spring IOC managed application that uses NHibernate in its persistence layer. We have use the Spring AOP and understand its terminology and capabilities. We have some investment in Spring proxies.
Now, we want to add a PropertyChangedMixin and a ValidatorInterceptor (not nhibernate validator, but based on Spring validation) onto our NHibernate managed objects.
I've looked at the hooks for NHiberate IInterceptor and EventListeners and that gives me a place to apply the desired proxies. If I use the Spring proxies is it going to play nice with the existing nhibernate proxies. We don't lazy load. From the simple nhibernate stuff the benefits of DynamicProxy look appealing.
I can go either way, but I'd like to hear suggestions.
Thanks, jeff
© Stack Overflow or respective owner