what is the expected result?

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?

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?

A.
An exception is thrown at Line 25.

B.
Anexceptionisthrown at Line 13.

C.
methodA cannot beinvokedbythis user.

D.
The codeexecutes without raising an exception.



Leave a Reply 0

Your email address will not be published. Required fields are marked *