nerdexam
Oracle

1Z0-860 · Question #107

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 run time 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 PrePersist and

How the community answered

(25 responses)
  • A
    12% (3)
  • B
    12% (3)
  • C
    72% (18)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice