Hi,
I'd like to add a log of all the hibernate action in my webapp.
For this i think that an interceptor is better than putting additionnal code.
If someone as an example for this, i'll be happy to read an implementation. ;-)
Thanks,
Fabien.
Hi,
I'd like to add a log of all the hibernate action in my webapp.
For this i think that an interceptor is better than putting additionnal code.
If someone as an example for this, i'll be happy to read an implementation. ;-)
Thanks,
Fabien.
For an example of Hibernate Interceptor, take a look at Interceptors of Hibernate Documentation.
To configure a Hibernate Interceptor with a LocalSessionFactoryBean, use the following:
HTHCode:<bean id="myInterceptor" class="com.company.MyInterceptor"/> <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> <property name="entityInterceptor"> <ref bean="myInterceptor"/> </property> </bean>
ok that's ok irbouho thanks,
Fabien.