@Retention(value=RUNTIME) @Target(value=METHOD) @Documented public @interface PostCreate
Annotation that designates a method to receive a callback when the object is associated with a newly created persistent entity. This method represents a transition from the Pooled state to the Ready state, and the object enters the Ready state after this method returns successfully.
This callback method can be used, for example, to initialise additional transient state or acquire additional resources that the object needs while it is in the Ready state.
This callback method is permitted to throw a CreateException
if for some reason the entity cannot be created successfully.
If this method throws an exception then the object does not enter the Ready state.
This callback method is invoked with an active transaction context.