-
Book Overview & Buying
-
Table Of Contents
EJB 3 Developer Guide
By :
Authorization, or access control, is the process of restricting operations to specific roles. In contrast with authentication, EJB authorization is completely application server independent. The EJB specification provides two kinds of authorization: declarative and programmatic. With declarative authorization all security checks are performed by the container. An EJB's security requirements are declared using annotations or deployment descriptors. With programmatic authorization security checks are hard-coded in the EJBs code using API calls. However, even with programmatic authorization the container is still responsible for authentication and for assigning roles to principals.
As an example, consider the BankServiceBean stateless session bean with methods findCustomer(), addCustomer() and updateCustomer()
:
package ejb30.session; import javax.ejb.Stateless; import javax.persistence.EntityManager; import ejb30.entity.Customer; import javax...
Change the font size
Change margin width
Change background colour