Valid 1Z0-895 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-895 Exam! ExamDiscuss.com now offer the newest 1Z0-895 exam dumps, the ExamDiscuss.com 1Z0-895 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-895 dumps with Test Engine here:
Suppose developer wants to create an EJB component that performs data validation every hour. Given the following Stateless session bean: What is the minimum modification you would need to make to the bean to support notification from the TimerService once the timer expires?
Correct Answer: D
Explanation/Reference: Programmatic Timers When a programmatic timer expires (goes off), the container calls the method annotated @Timeout in the bean's implementation class. The @Timeout method contains the business logic that handles the timed event. The @Timeout Method Methods annotated @Timeout in the enterprise bean class must return void and optionally take a javax.ejb.Timer object as the only parameter. They may not throw application exceptions. @Timeout public void timeout(Timer timer) { System.out.println("TimerBean: timeout occurred"); } Reference: The Java EE 6 Tutorial, Using the Timer Service