HTML and CSS Reference
In-Depth Information
The main methods of UserSearchBacking CDI bean are as follows:
retrieveUserList : Calls retrieveMegaUsers method of UserManager EJB. If results returned
successfully, a message with the number of returned users is displayed to the user including
the users list (administrator and users).
deleteUser : Calls removeMegaUser method of UserManager EJB passing the currently
selected user ID (using currentSelectedUser.getId() ) as a parameter. If the user is deleted
successfully, the following "User deleted successfully" will be displayed to the user.
Mega App uses CDI version 1.1, and Listing 13-34 shows the application's bean.xml file under WEB-INF folder.
Listing 13-34. Mega App beans.xml File
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" "
xmlns:xsi=" "
xsi:schemaLocation=" "
version="1.1" bean-discovery-mode="annotated">
Applying Security
In Mega App, we have implemented container-managed security for application authentication, and page authorization.
Listing 13-35 shows the Mega App security constraints which are defined in the application web.xml file.
Listing 13-35. Mega App Security Constraints
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns=" "
xmlns:xsi=" "
xsi:schemaLocation=" "
Search WWH ::

Custom Search