Oracle
1Z0-860 · Question #179
A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11.〦ntity 12. @Entityl_isteners(com. acme.AlertMonitor. class) 13…
The correct answer is C. Methods of the class com.acme.AlertMonitor annotated with callback annotations must take an Object. See the full explanation below for the reasoning.
Question
A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11.〦ntity 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?
Options
- AThe validate Create method may NOT throw runtime exceptions.
- BThe validate Create method can invoke the EntityManager.flush operation.
- CMethods of the class com.acme.AlertMonitor annotated with callback annotations must take an Object
- DThe above class definition is NOT correct. An entity cannot define a callback method like PrePersistand
How the community answered
(51 responses)- A8% (4)
- B2% (1)
- C76% (39)
- D14% (7)
Community Discussion
No community discussion yet for this question.