In this exercise, you model the ejb implementation design subpackage. This subpackage models the enterprise JavaBeans (EJB) layer that contains the domain models that persist the data for the application. The EJB layer implements the business logic for the itso.ad.business layer.
The ejb impementation design subpackage is divided into the three subpackages in the following table:
Package | Description |
---|---|
model | This subpackage describes the domain classes that represent the persistent application data. The model subpackage contains the Customer and Account classes that you defined in the analysis model. |
to | This subpackage contains the transfer objects that abstract information between the design layers in the model. The transfer objects are interfaces that are implemented by the Customer and Account classes. |
facade | This subpackage contains the implementation of the business logic for the PiggyBank online banking system. The session facade contains the PiggyBankController class that defines the functional tasks, such as the Display Balance, Transfer Money, and Cash Check operations that were described in the PiggyBank use case model. |
In this exercise, you create the Customer and Account domain EJB classes and their interfaces. You create the IAccount and ICustomer interfaces in the framework package.
The Customer and Account enterprise beans form the domain
of the PiggyBank design model and are used to persist the application
data. The Customer and Account classes are derived from the same
two classes that you identified in the PiggyBank analysis model. Because you decided at
design time not to persist transfer or check data, there is no need
to create persistable Transfer and Check business objects.
You have created the Customer entity EJB. Your diagram should look similar to the following figure:
You have created the Persistent Entity EJB Model diagram. Note that the getData operations of the Customer and Account enterprise beans return the transfer object interfaces that you created in the previous exercise. Your diagram should look similar to the following figure:
The transfer object enterprise beans are used to transfer data between the layers of the PiggyBank design model. The PiggyBankEJBCustomerTO and PiggyBankEJBAccountTO implement the ICustomer and IAccount interfaces that you defined in the framework component layer.
Your diagram should look similar to the following figure:
Your diagram should look similar to the following figure:
The facade component separates the persistent application data from the business logic. The facade enterprise bean is defined by the PiggyBankController class which is derived from the control classes that you identified in the PiggyBank analysis model.
You have modeled the itso.ad.business component layer facade. Your diagram should looked similar to the following figure:
To continue, proceed to Exercise 3.7: Creating the EJB delegate component subpackage.