About PostPersist

1-4 of 4Refresh
JPA Doc
157

javax.persistence.PostPersist

javax.persistence Annotation PostPersist Target: Callback methods Is used to specify callback methods for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class. Since: JPA 1.0 Learn how to define and use
Manual
45

JPA Lifecycle Events

MyEntityWithCallbacks { @PrePersist void onPrePersist() {} @PostPersist void onPostPersist ... (added to the EntityManager). @PostPersist - after storing a new entity in the database (during commit or ... MyListener { @PrePersist void onPrePersist(Object o) {} @PostPersist void onPostPersist(Object
Forum
2

JPA lifecycle events across processes

Hi, wondering if it's possible to listen for changes in one process from another process? ie: process A changes an entity process B listens for @PostPersist   thanks   This is not supported. You may be able to implement your own cross process event listeners based on the JPA event listeners
Forum
2

Auto Date for Creation and Update

to check @PostPersist and other callbacks as well. > it would be MUCH more simple