Announcement Announcement Module
Collapse
No announcement yet.
Hibernate interceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hibernate interceptor

    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.

  • #2
    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:
    Code:
    <bean id="myInterceptor" class="com.company.MyInterceptor"/>
    <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> 
      <property name="entityInterceptor">
        <ref bean="myInterceptor"/>
      </property>
    </bean>
    HTH

    Comment


    • #3
      ok that's ok irbouho thanks,

      Fabien.

      Comment

      Working...
      X