Oracle
1Z0-860 · Question #253
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?
Exhibit
Options
- AThe validateCreate method may NOT throw runtime exceptions.
- BThe validateCreate 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 PrePersist and
How the community answered
(22 responses)- A5% (1)
- B14% (3)
- C77% (17)
- D5% (1)
Community Discussion
No community discussion yet for this question.
