Implementing Data Access

In this unit, you will start by learning how to create an EJB Module project named QuickCarRentalEjb.

You will then create an entity bean QuickBookingBean of the type container-managed persistence (CMP). You will define this bean in such a way that it will be associated with the table QCR_RESERVATION, which you created previously in the database. You will create a corresponding CMP field for each column in this table. For each bean instance, these fields will contain the data for the associated data record. You will then be able to create, edit, and delete data records in the car rental application using the appropriate access methods for these CMP fields.

You will take into account the data needed to create a new table record when implementing the ejbCreate method.

So that the CMP fields can be accessed from the business logic, the last step in this unit will entail propagating the access methods from the local interface.

Next step:

Creating an EJB Module Project