Oracle
1Z0-860 · Question #23
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…
The correct answer is B. A client in the role "AGENT" will be able to access any of the methods. See the full explanation below for the reasoning.
Question
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?
Options
- AA client in any role will be able to access any of the methods.
- BA client in the role "AGENT" will be able to access any of the methods.
- CA client in the role"SECRET" will be able to access any of the methods.
- DA client in the role "AGENT" will be able to access methodB and methodA(String), but not methodA(int).
- EA client in the role "SECRET" will be able to access methodA(int) and methodB, but NOT
How the community answered
(22 responses)- A14% (3)
- B77% (17)
- C5% (1)
- E5% (1)
Community Discussion
No community discussion yet for this question.