1.6.2. Overview of the booking example
The project structure is identical to the previous one, to install and deploy this application, please refer to Section 1.1, “Try the examples”. Once you've successfully started the application, you can access it by pointing your browser to http://localhost:8080/seam-booking/
Just ten classes (plus six session beans local interfaces and 1 annotation interface) where used to implement this application. Six session bean action listeners contain all the business logic for the listed features.
BookingListAction retrieves existing bookings for the currently logged in user.
ChangePasswordAction updates the password of the currently logged in user.
HotelBookingAction implements the core functionality of the application: hotel room searching, selection, booking and booking confirmation. This functionality is implemented as a conversation, so this is the most interesting class in the application.
LoginAction validates the login details and retrieves the logged in user.
LogoutAction ends the login session.
RegisterAction registers a new system user.
Three entity beans implement the application's persistent domain model.
Hotel is an entity bean that represent a hotel
Booking is an entity bean that represents an existing booking
User is an entity bean to represents a user who can make hotel bookings
Finally, the LoggedIn annotation and the LoggedInInterceptor are used to protect actions that require a logged in user.