Oracle
1Z0-860 · Question #230
1Z0-860 Question #230: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-860 to reveal the answer and full explanation for question #230. The question stem and answer options stay visible for context.
Question
A developer implements a session bean with a method doStuff which behaves differently depending on the caller's security role. Only users in security roles "ADMIN" and "USER" are allowed to call the method. Assume that there is no security-related metadata in the deployment descriptor. Which two, taken in combination, are appropriate to accomplish this? (Choose two.)
Options
- AAnnotate method do Stuff with @PermitAII.
- BAnnotate method do Stuff with @RolesAllowed({"ADMIN","USER"})
- CIf EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for users in role ADMIN.
- DIf EJBContext.isCallerlnRole("ADMIN") returns true, implement the behavior defined for users in role
Unlock 1Z0-860 to see the answer
You've previewed enough free 1Z0-860 questions. Unlock 1Z0-860 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.