Activity:
|
Purpose
The purpose of EJB Design is to identify and specify the Design Classes that make up Enterprise JavaBeans (EJBs). As with activity: Class Design, the purpose is:
| |
Role: Designer | |
Frequency: Occurs repeatedly during all iterations after Inception. May also occur in Inception if there are prototyping activities. | |
Steps
| |
Input Artifacts:
| Resulting Artifacts:
|
Tool Mentors: | |
More Information:
|
Workflow Details:
|
Identify EJBs from the Analysis Classes and/or initial Design Model elements. EJBs may also be identified as part of a design pattern. Incorporating a pattern is effectively performing many of the steps in this activity (adding new classes, operations, attributes, and relationships), but in accordance with the rules defined by the pattern. For examples of J2EE patterns, see Core J2EE Patterns ([ALU01].
There are a few key decisions to make.
For more information on identifying EJBs, see Guidelines: Identifying EJBs.
Identify any attributes for the EJB.
In particular, for each entity bean, identify its persistent attributes, and primary key.
For more information on defining entity EJB attributes, see Guidelines: Designing Entity Beans.
This step is applicable to session and entity beans. It is not applicable to message-driven beans.
The design of operations is covered by Activity: Class Design, in particular the step Define Operations.
Some key decisions for EJBs are:
For more information on defining EJB operations, see Guidelines: Designing EJBs.
The design of class behavior is covered by Activity: Class Design.
A key step in designing an EJB is identifying which EJB mechanisms to use, if not already specified when the EJB was first identified. Decisions include:
Many of these mechanism decisions will have been made by the Software Architect at a project level, in which case, the Designer follows project guidelines.
While part of the EJB behavior is provided by the methods, additional behavior is provided through EJB collaborations. You can create references between EJB's, and for CMP 2.0 entity EJBs, you can create container-managed relationships (CMR's) between them.
Detailed guidance on designing EJB behavior is provided by Guidelines: Designing EJBs.
This step is applicable to all EJBs.
This is where additional Design Classes that support the EJB design are identified. Common support classes include Primary Key classes (PK classes), Data Accessor Objects (DAO's), and Value Objects (VO's). DAO's are used in implementing BMP entity EJBs to hide the database manipulation details. This makes it easier to port an application from one database server to another. VO's are used for accessing data transparently and passing data values between components in efficient ways.
You can create references between EJBs and container-managed relationships (CMR's) between EJBs.
Additional supporting classes may be defined through the application of patterns. For more information on J2EE patterns, see Core J2EE Patterns ([ALU01].
See Activity: Class Design for general guidance on designing classes.
Rational Unified Process
|