EJB transformation profile

The EJB transformation profile defines stereotypes that the UML to EJB transformation interprets to generate enterprise beans. The following table lists the stereotypes that the EJB transformation profile defines:

Stereotype

Target element

UML to EJB transformation interpretation

<<Entity>>

UML class

Represents an entity bean

<<Service>>

UML class

Represents a session bean with a stereotype property "hasState" that is initially set to false, which signifies that the session bean is stateless.

<<MessageProcessor>>

UML class

Represents a message-driven bean

<<Id>>

UML attribute

Represents a CMP or BMP field to be used as part of the primary key of an entity bean

<<Query>>

UML operation

Represents a query method on an entity bean

The EJB transformation profile also defines the following constraints:

·   A UML class should have only one of the following stereotypes: <<Entity>>, <<Service>>, or <<MessageProcessor>>

·   A class with a stereotype should have only a generalization relationship to another class with the same stereotype

·   A <<Query>> stereotype should be applied only to an operation on a class with the <<Entity>> stereotype

·   An <<Id>> stereotype should be applied only to an attribute on a class with the <<Entity>> stereotype  

When you validate a model with the EJB transformation profile, these constraints generate warnings. Before you run the UML to EJB transformation, you should correct the issues that generate the warnings. However, the warnings do not prevent you from running the transformation.

Terms of use | Feedback
(C) Copyright IBM Corporation 2004.
All Rights Reserved.