Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] What options do I have for configuring auditing of Entities

Those are the main event mechanisms.  There is currently no annotations/xml
for DescriptorEvents, you must use a customizer, please log a bug/request
for this.

Other options include performing the auditing logic in your application or
data access layer, or in your database through triggers or database auditing
features.


fcalfo wrote:
> 
> So it looks like these are the options currently available to support
> auditing of data events on Entities (i.e., I want to insert a row into a
> separate audit table whenever a new Foo is persisted):
> 
> 1) Register an Entity method as a DescriptorEvent handler
> 2) Register a separate class as a DescriptorEvent listener
> 3) Add the @PrePersist and @PreUpdate annotations to a method on the
> Entity (or its base class) - but this is probably of limited use since it
> does not provide the DescriptorEvent so a lot of the context will not be
> available for the audit logic
> 
> Are there any other options provided by EclipseLink?
> 
> Also, there do not seem to be any annotations to directly configure either
> of the first two options, correct?  I'd need to use a @Customizer so I can
> get access to the ClassDescriptor and get its EventManager to add the
> listeners to, correct?
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/What-options-do-I-have-for-configuring-auditing-of-Entities-tp24175205p24274544.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top