You can select one or several items from the Model Explorer view as the source for the UML to EJB transformation. The following table lists the items that the transformation accepts as a valid source:
Source |
Result |
UML Model |
Transforms all packages, classes, and interfaces in the model |
UML Package |
Transforms the package and all classes and interfaces in that package |
UML Class |
· Transforms the class and all the attributes, operations, classes, and interfaces in that class · The parent of the class must be a UML package |
UML Interface |
· Transforms the interface and all the attributes, operations, classes, and interfaces in that interface · The parent of the interface must be a UML package |
To generate enterprise beans from a source model, the source model must have the EJB transformation profile applied to it, and the model elements must be marked with stereotypes from the EJB transformation profile.
The UML to EJB transformation accepts a single EJB project as its target. You can create the EJB project with or without a client project. The transformation generates code in the first source folder that it detects in the EJB project (typically ejbModule) and in the first source folder that it detects in the client project (typically src), if a client project exists.
The version of the EJB container that is associated with the EJB project affects the UML to EJB transformation. Each version of EJB container has different rules that must be followed for the UML to EJB transformation to function and process properly. The following table lists the rules that are associated with the different versions of EJB containers:
EJB container version |
Rules that affect the transformation |
2.1 |
Container-managed persistence (CMP) 1.1 beans must be generated with remote interfaces only |
2.0 |
CMP 1.1 beans must be generated with remote interfaces only |
1.1 |
· CMP 2.x beans cannot be generated · CMP 1.1 beans must be generated with remote interfaces only · Bean-managed persistence (BMP) beans must be generated with remote interfaces only · Session beans must be generated with remote interfaces only · Message-driven beans cannot be generated |
If the above rules are not followed before you run the transformation, the EJB transformation does not process the source model and transforms nothing.
Terms
of use | Feedback
(C) Copyright IBM Corporation 2004. All Rights Reserved.