A developer wants to create a portable EJB 3.0 application that includes the following class
definition for the Entity Account:
11.©Entity
12. @Entityl_isteners(com. acme.AlertMonitor. class)
13. public class Account {
14. // more code here
15. @PrePersist
16. protected void validateCreate0 {/* more code here */}
17.}
Which statement is correct?
A.
The validateCreate method may NOT throwruntimeexceptions.
B.
ThevalidateCreate method can invoke the EntityManager.flush operation.
C.
Methods oftheclass com.acme.AlertMonitor annotatedwithcallback annotationsmusttake an
Object or Account instance astheonly argument.
D.
The above class definition is NOT correct. An entity cannot defineacallback methodlike
PrePersistand use the EntityListeners annotationatthe same time.