1Z0-895 · Question #61
Suppose a developer wants to create an automatic persistent timer that performs data validation every hour. Given the following stateless session bean: @Stateless Public class OrderVerificationBean…
The correct answer is B. Modify the verifyExternalOrders method to look like this. Not D: Timers are persistent by default. If the server is shut down or crashes, persistent timers are saved and will become active again when the server is restarted. If a persistent timer expires while the server is down, the container will call the @Timeout method when the…
Question
Options
- AModify the verifyExternalOrders methos to look like this:
- BModify the verifyExternalOrders method to look like this:
- CModify the verifyExternalOrders method to look like this:
- DModify the verifyExternalOrders method to look like this:
How the community answered
(49 responses)- A10% (5)
- B82% (40)
- C2% (1)
- D6% (3)
Explanation
Not D: Timers are persistent by default. If the server is shut down or crashes, persistent timers are saved and will become active again when the server is restarted. If a persistent timer expires while the server is down, the container will call the @Timeout method when the server is restarted. Nonpersistent programmatic timers are created by calling TimerConfig.setPersistent(false) and passing the TimerConfig object to one of the timer-creation
Topics
Community Discussion
No community discussion yet for this question.