In this exercise, you model the framework layer of the itso.ad.business package. The framework component layer separates the client interface from both the persistent application data and the implementation of the application. The framework component layer contains the transfer object and delegate interfaces, as well as the delegate factory classes and exceptions.
The framework component layer contains the design subpackages in the following table:
Package | Description |
---|---|
exception | This subpackage contains the ServiceException and DataAccessException exception classes that provide error recovery for the PiggyBank online banking system. |
factory | This subpackage contains the BusinessDelegateFactory class that is used to dynamically create a business delegate. |
interfaces.delegates | This subpackage contains the interfaces for the business delagate. |
interfaces.to | This subpackage contains the interfaces for the transfer objects. |
Transfer objects are used as return types for remote procedure calls. The PiggyBank transfer objects transport customer and account information between layers in the PiggyBank design. This exercise models the transfer object interfaces.
You have modeled the transfer object interfaces. Your diagram should look similar to the following figure:
The business delegate interface definitions describe the business delegate methods and factory components that are used to generate a business delegate implementation instance. The IPiggyBankBusinessDelegate interface defines an interface to the PiggyBank business logic. The AbstractBusinessDelegateFactory class instantiates IPiggyBankBusinessDelegate instances.
You have modeled the delegate interfaces. Note that the getAccountsByCustomer and getCustomerById operations return the transfer object interfaces that you created in the previous exercise. Your diagrams should look similar to the following figure:
The BusinessDelegateFactory class is used to dynamically create a delegate factory instance.
You have modeled the itso.ad.business layer factory classes. Your diagram should look similar to the following figure:
The framework component layer contains the implementation of two exceptions: DataAccessException, which is thrown whenever an error occurs in the business layer, and ServiceException, which occurs because of a loss of service.
You have modeled the itso.ad.business framework component layer. The framework layer is an isolation layer that hides the PiggyBank client interface from the PiggyBank implementation. You can now complete the itso.ad.business design elements diagram by dragging the factory package into the diagram. Connect the delegate.ejb package to the factory package with a usage relationship. Connect the factory package to the framework package with an association relationship. Your diagram should look similar to the following figure:
To continue, proceed to Exercise 3.6: Modeling the EJB component subpackage .