GIAC
GSSP-JAVA · Question #200
GSSP-JAVA Question #200: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #200. The question stem and answer options stay visible for context.
Question
You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor? Each correct answer represents a complete solution. Choose all that apply.
Options
- AAnnotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).
- BAnnotate method doPrint() with @PermitAll.
- CIf EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for
- DIf EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for
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.