persistence@glassfish.java.net

Seams to provide audited persistence?

From: MacDermid, Kenny <kmacdermid_at_ncipher.com>
Date: Wed, 1 Nov 2006 13:39:35 -0700

Hello,
 
We're looking to create shadow tables of all objects persisted for audit
and temporal object viewing. We plan to have tables like:
 
User [fname, lname] - to represent the current state on the system.
 
UserVer [fname, lname, transactionNumber, delete] - to provide an
audited view.
 
We want to provide fast access to everything in the system in it's
current state, while providing slower access to all objects with
dependencies at any point in the past.
 
First, do you know of any other projects that are doing this? (We
googled everything we could think of, with no real luck).
 
Second, do you have any recommendations at to where to inject our code
into the JPA standard. A couple idea's we have been throwing around are
to create a class to wrap the EntityManager and create the audit objects
at the same time there. Second would to be create a persistence provider
to wrap whichever persistence provider we choose to use. Third would
probably be using Hibernate directly, and making use of the
Interceptors.
 
Any thing at all that could help with be greatly appreciated. Thanks in
advance,
 
Kenny