nerdexam
GIAC

GSSP-JAVA · Question #113

GSSP-JAVA Question #113: Real Exam Question with Answer & Explanation

Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #113. The question stem and answer options stay visible for context.

Question

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. package Mark.tutorial.javaee.ejb; import java.util.logging.Logger; import javax.annotation.Resource; import javax.ejb.Stateless; import javax.ejb.Timeout; import javax.ejb.Timer; import javax.ejb.TimerService; @Stateless public class TimerBean implements TimerSessionBean { @Resource TimerService timerService; private static final Logger logger = Logger.getLogger ("com.sun.tutorial.javaee.ejb.timersession.TimerSessionBean"); public void createTimer(long intervalDuration) { Timer timer = timerService.createTimer(intervalDuration, "New timer created"); } @Timeout public void timeout(Timer timer) { logger.info("Timer Timeout"); } } Which of the following statements are true about the code? Each correct answer represents a complete solution. Choose all that apply.

Options

  • AThe class Logger cannot be used with a stateless session bean.
  • BThe EJB container will invoke the timeout method of TimerSessionBean when the timer
  • CThe class is using the createTimer method incorrectly because it creates a new timer.
  • DTimerBean is a stateless session bean that shows how to set a timer.

Unlock GSSP-JAVA to see the answer

You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full GSSP-JAVA Practice