hi all.
i use Spring2.5, JPA(EntityManager) and hibernate to build my application.
we have a demand that we must generate audit log for each dao method.
JPA's callback and listener is too simple to do this and it seems hibernate interceptor must be used in Configuration, sessionFactory these non-JPA APIs.
my current solution is using spring aop but it can't keep track of the modify of the entity fields.
my question is
how to use Hibernate Interceptor in JPA apis(EntityManager)? or how to create audit logs for dao methods naturally in jpa?
any reply will be appreciate. thx.
Hibernate version: 3.2? (copy from JBossSeam 2.0GA libs)
|