Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9987

Cannot create session scoped hibernate interceptors in Hibernate4

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: Waiting for Triage
    • Component/s: Data:ORM
    • Labels:
      None

      Description

      Hibernate can be attached to the SessionFactory (if they're stateless) or to the Session (see http://docs.jboss.org/hibernate/orm/4.0/manual/en-US/html/events.html)

      In hibernate 3 the way to attach an interceptor to the session is by declaring it at the transaction level:

      <bean id="txManager"
      class="org.springframework.orm.hibernate3.HibernateTransactionManager">
      <property name="sessionFactory" ref="sessionFactory" />
      <property name="entityInterceptor" ref="myInterceptor" />
      </bean>

      However, in class org.springframework.orm.hibernate4.HibernateTransactionManager the entityInterceptor property does not exist, making it impossible to use a state interceptor.

        Attachments

          Activity

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              mmalmeida Miguel Almeida
              Last updater:
              Chris Beams
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                5 years, 28 weeks, 3 days ago