| audit tracking [message #523584] |
Fri, 26 March 2010 19:18  |
No real name Messages: 3 Registered: March 2010 |
Junior Member |
|
|
Hi,
Basically i have to track life cycle status changes of business objects and log from which status an object has migrated to which status. We do not want to track every change in data, but only those changes that have the targeted business value. We have to store this history for years and display it in appropriate screens.
In openJPA, i can configure restoreState to obtain the old state of the object. How could i achieve this with EclipseLink?
Will the life cycle change listeners for this purpose cause any performance deterioration? Our Architects advised that we solve it in Java rather than with PL/SQL triggers.What other solutions are available for audit tracking?
Could you please give me links to EclipseLink examples for audit tracking?
Thank you.
|
|
|
|
| Re: audit tracking [message #523917 is a reply to message #523584] |
Mon, 29 March 2010 15:41  |
James Sutherland Messages: 1844 Registered: July 2009 |
Senior Member |
|
|
In addition to JPA events EclipseLink has DescriptorEvents that are raised in more operations, and with additional information. There are events for preInsert/postInsert/aboutToInsert/Update/Delete. Each event has an ObjectChangeSet that contains the changes.
See,
DescriptorEventListener
and,
DescriptorEvent and ObjectChangeSet
You can also get a list of changes from the EclipseLink UnitOfWork, and can get the previous state of a object using getBackupClone (provided deferred change tracking is used).
James : Wiki : Book : Blog
|
|
|
Powered by
FUDForum. Page generated in 0.01582 seconds