-->
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: Running multiple interceptors and audit fields
PostPosted: Thu May 26, 2005 12:57 pm 
Newbie

Joined: Thu May 26, 2005 12:44 pm
Posts: 1
I'm running Hibernate 3.

I have two types of domain objects. One has a base set of audit attributes (e.g., addedBy, editedBy) and another set has additional audit attributes (e.g., approvedBy). I was considering using two interceptors for this: one for the objects with just the standard audit attributes and one for the objects with the extended set. The question is...

If each interceptor is only knows about it's own audit attrbutes, what will happen if it reports that audit data from the other set has changed (afterall he doesn't know it's audit data)? I presume hibernate simply combines the result arrays from each findDirty() it calls and assumes dirtiness if at least one interceptor reported an attribute dirty. Do I need to have my interceptors aware of each other's audit data? Or would I be better off just merging all this into one interceptor? I prefer the two interceptor approach simply because it would be a lot cleaner code but I also want to know it will work and what the semantics are when there are multiple interceptors. Thanks,

marc


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.