nerdexam
Oracle

1Z0-860 · Question #9

A developer is writing implementation code for an EJB 3.0 message-driven bean class that processes booking requests. Within the business logic of the onMessage method, a temporary problem can occur…

The correct answer is C. Make use of the TimerService, and implement the TimedObject interface. D. Make use of the TimerService, implement are process method, and annotate it with @Timeout. See the full explanation below for the reasoning.

Question

A developer is writing implementation code for an EJB 3.0 message-driven bean class that processes booking requests. Within the business logic of the onMessage method, a temporary problem can occur. In that case the developer wants to make sure that the booking request is processed again in 30 minutes. Which two can the developer select? (Choose two.)

Options

  • AThrow a runtime exception to rollback the transaction.
  • BCall set RollbackOnly on the MessageDrivenContext interface.
  • CMake use of the TimerService, and implement the TimedObject interface.
  • DMake use of the TimerService, implement are process method, and annotate it with @Timeout.
  • EThrow an application exception, and add the retry-after attribute to the deployment descriptor.

How the community answered

(50 responses)
  • A
    16% (8)
  • B
    8% (4)
  • C
    72% (36)
  • E
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice