-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using interceptors for Auditing
PostPosted: Fri Nov 21, 2008 10:30 am 
Newbie

Joined: Fri Nov 21, 2008 9:59 am
Posts: 3
Location: UK
Hi,

I am planning to use hibernate EmptyInterceptor for performing database auditing.

The idea is: once a record is updated, audit information will be inserted in a separate table. For updates, it should also track old values. (Hence I choosed EmptyInterceptor and also tried PostUpdateEventListener).

Is EmptyInterceptor can be used for such audit requirement. I have refered hibernate reference chapter 12 for this implementation.

Also, I have sessionFactory defined in the config xml file. Using entityInterceptor property, I am setting my implementation of EmptyInterceptor in sessionFactory. Now, this interceptor also requires sessionFactory so that it inserts records in audit table. Here sessionFactory and interceptor requires each other.. and thats the problem.....

Please let me know, in which way I can resolve this. Same issue applies when I use PostUpdateEventListener.


Regards,
Nikam S


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.