Quiz

1:When a user is authenticated using JAAS security, which of the following statements are true?
  1. An initial context is established

  2. A Subject object is created and mapped to a principal

  3. A principal is mapped to the user

  4. A LoginModule is created

A1: A, B
2:In the programmatic approach, which of the following methods are used to check user authorization?
  1. isCallerInRole() of the HttpServletRequest in the Web container

  2. isCallerInRole() of the EJBContext in the EJB container

  3. login()

  4. LoginContext()

A2: A, B

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.