[jboss-user] [EJB 3.0] - Advanced trigger mechanism for Entities

wark2007 do-not-reply at jboss.com
Tue Jun 3 12:17:12 EDT 2008

I am looking for a "trigger" implementation (similar to database trigger) for entity beans. I had  a look on the EventListener and they are quite good in many cases but they have one huge disadvantage - they don't give me access to the old object, since only the current object is passed to the @PreUpdate/@PostUpdate methods.

Is there any way to get also the old value in JPA or in the JBoss implementation, something like:

  | @PreUpdate
  | void preUpdate(EntityClass new, EntityClass old) {
  |   if (new.foo != old.foo) {
  |   }
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155430#4155430

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155430

More information about the jboss-user mailing list