Spring & Hibernate EJB Events

Posted by Miguel Ping on Stack Overflow See other posts from Stack Overflow or by Miguel Ping
Published on 2008-11-03T11:03:58Z Indexed on 2010/06/17 16:53 UTC
Read the original article Hit count: 235

Filed under:
|
|
|
|

Is it possible to define a spring-managed EJB3 hibernate listener?

I have this definition in my persistence.xml:

<properties> 
    <property name="hibernate.ejb.interceptor"
        value="my.class.HibernateAuditInterceptor" /> 
    <property name="hibernate.ejb.event.post-update"
        value="my.class.HibernateAuditTrailEventListener" /> 
</properties>

But I would like to manage HibernateAuditInterceptor and HibernateAuditTrailEventListener with spring, so I can do some bean injection (ex: session-scoped bean) within these classes. Is this possible?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about spring