Which statement is true?

An Application Assembler is given the following stateless session bean:
10. @Stateless public class MyBean implements Mylnt {
11. @RolesAllowed(“SECRET”)
12. public void methodA(int x) {}
13. public void methodA(String y) {}
14. public void methodB(String z) {}
15.}
A deployment descriptor is also supplied, a portion of which reads as follows:
20. <methoD. permission>

21. <rolE. name>AGENT</rolE. name>
22. <method>
23. <ejB. name>MyBean</ejB. name>
24. <methoD. name>methodA</methoD. name>
25. </method>
26. </methoD. permission>
Which statement is true?

An Application Assembler is given the following stateless session bean:
10. @Stateless public class MyBean implements Mylnt {
11. @RolesAllowed(“SECRET”)
12. public void methodA(int x) {}
13. public void methodA(String y) {}
14. public void methodB(String z) {}
15.}
A deployment descriptor is also supplied, a portion of which reads as follows:
20. <methoD. permission>

21. <rolE. name>AGENT</rolE. name>
22. <method>
23. <ejB. name>MyBean</ejB. name>
24. <methoD. name>methodA</methoD. name>
25. </method>
26. </methoD. permission>
Which statement is true?

A.
A client in any role will be able to access any of the methods.

B.
A client in the role “AGENT” will be able to access any of the methods.

C.
A client in the role “SECRET” will be able to access any of the methods.

D.
A client in the role “AGENT” will be able to access methodB and methodA(String), but not
methodA(int).

E.
A client in the role “SECRET” will be able to access methodA(int) and methodB, but NOT
methodA(String).



Leave a Reply 0

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