Chapter 4. Sample JSF-EJB3 Application
We use a simple "TODO" application to show how JSF and EJB3 work together in a web application. The "TODO" application works like this: You can create a new 'todo' task item using the "Create" web form. Each 'todo' item has a 'title' and a 'description'. When you submit the form, the application saves your task to a relational database. Using the application, you can view all 'todo' items, edit/delete an existing 'todo' item and update the task in the database.
The sample application comprises the following components:
Entity objects - These objects represent the data model; the properties in the object are mapped to column values in relational database tables.
JSF web pages - The web interface used to capture input data and display result data. The data fields on these web pages are mapped to the data model via the JSF Expression Language (EL).
EJB3 Session Bean - This is where the functionality is implemented. We make use of a Stateless Session Bean.