nerdexam
Oracle

1Z0-860 · Question #54

Given: 10. ©Stateless 11. @RunAs("X") 12. public class SecureBeanOl implements SecureOl { 13. @EJB Secure02 secure02; 23. @RolesAllowed("A") 24. public void methodA0 { 25. secureO2.methodB0; 26.}…

The correct answer is A. An exception is thrown at Line 25. See the full explanation below for the reasoning.

Question

Given: 10. ©Stateless 11. @RunAs("X") 12. public class SecureBeanOl implements SecureOl { 13. @EJB Secure02 secure02; 23. @RolesAllowed("A") 24. public void methodA0 { 25. secureO2.methodB0; 26.} 10. ©Stateless 11. public void SecureBean02 implements Secure02{ 23. @RolesAllowed("A") 24. public void methodB0 { A user who is only in role A invokes SecureOl. methodA. Assuming NO other security-related metadata, what is the expected result?

Options

  • AAn exception is thrown at Line 25.
  • BAn exception is thrown at Line 13.
  • CMethodA cannot be invoked by this user.
  • DThe code executes without raising an exception.

How the community answered

(21 responses)
  • A
    81% (17)
  • B
    5% (1)
  • C
    10% (2)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice