Creating and Implementing Auxiliary Classes

Before you start to construct the business logic for your car rental application and create a session bean, you will first create three auxiliary classes. These classes contain implementations that will be used at different points in the application – including from within different project types (such as a EJB Module project or Web Module project) – or even from a Web service.

You will create these auxiliary classes in a separate Java project that only acts as a source container.




This class contains the definition of constants that are needed at different points in the application.


You need this JavaBean class to store the data from the entity bean QuickBookingBean in a form that can be displayed. QuickBookingModel should be passed directly to a servlet or Web service so that the booking data can be processed.


You need this exception class to handle the specific exceptions thrown by the car rental application.

Next step:

Creating a Java project as a source container