The mapping between EJB and UML elements

In UML visualization, Enterprise JavaBeans (EJB) enterprise beans and elements are represented in Unified Modeling Language (UML) class diagram views based on the specification for mapping between the EJB architecture and UML, as defined by the UML/EJB Mapping Specification request JSR -000026 (also known as JSR-26).

JSR-26 defines this standard mapping specification for representing Java and EJB technology-based components using UML. Released and updated through the Java Community Process Program, JSR-26 provides the developer community with a key link between these two technologies.

In UML class diagrams, UML notation is used to represent enterprise beans, the fields and methods that comprise an enterprise bean, and the relationships between enterprise beans following JSR-26.

UML class diagrams can also reflect Java classes and interfaces. By default, fields map to attributes and methods map to operations. Depending on the nature of the relationship, it can be useful to represent Java fields as an association to a Java class.

A stereotype is an extension mechanism that broadens the vocabulary of UML and gives more specific meaning to a Java class, a Java interface, or an enterprise bean. The following table shows how enterprise beans and EJB elements map to UML elements and stereotypes with icons in UML class diagrams.

EJB element UML element Stereotype Icon
EJB JAR file Artifact <<EJB Jar>>

The image shows the icon for EJB jars.

Container-managed persistence (CMP) 1.x entity bean Component <<Entity Bean>>

The image shows the icon for CMP 1.x entity beans.

CMP 2.x entity bean Component <<Entity Bean>>

The image shows the icon for CMP 2.x entity beans.

Bean-managed persistence (BMP) entity bean Component <<Entity Bean>>

The image shows the icon for BMP entity beans.

Message-driven bean Component <<Message Driven Bean>>

The image shows the icon for message driven beans.

Session bean Component <<Session Bean>>

The image shows the icon for EJB <a href=session beans." />

Session bean facade Component <<Session Bean>>

The image shows the session facade icon.

Bean class Class <<Bean Class>>

The image shows the icon for bean classes.

Remote interface Class <<Remote Interface>>

The image shows the icon for remote interfaces.

Local interface Class <<Local Interface>>

The image shows the icon for local interfaces.

Home interface Class <<Home Interface>>

The image shows the icon for home interfaces.

Local home interface Class <<Local Home Interface>>

The image shows the icon for local home interfaces.

Method permission Class <<Method Permission>>

The image shows the icon for method permissions.

Exclude list Class <<Exclude List>>

The image shows the icon for exclude lists.

Primary key class Class <<EJB Primary Key Class>>

The image shows the icon for primary key classes.

Primary key field Attribute <<EJB Primary Key Field>>

The image shows the icon for primary key fields.

CMP field Attribute <<CMP Field>>

The image shows the icon for <a href=CMP fields (attributes)." />

Local method Operation <<Local>>

The image shows the icon for local methods.

Remote method Operation <<Remote>>

The image showis the icon for remote methods.

Local home method Operation <<Local Home>>

The image shows the icon for local home methods.

Home method Operation <<Home>>

The image shows the icon for home methods.

Method element Operation <<Method Element>>

The image shows the icon for method elements.

Security role name Actor <<Role Name>>

The image shows the security role name icon.

Security role name reference Actor <<Role Name Reference>>

The image shows the security role name reference icon.

WebSphere Application Server (WAS) extension for EJB inheritance relationship Inheritance <<WAS Inheritance>> None
CMP relationship Association <<Relationship>> None
Relationship between an enterprise bean and its home, remote (local-home, local) interfaces Implementation <<EJB Implementation>> None
Relationship between an EJB JAR file and its contained entity beans Manifestation <<Manifestation>> None
Relationship between an enterprise bean and its bean classes Realization <<EJB realization>> None
Remote reference between enterprise beans Usage <<Reference>> None
Local reference between enterprise beans Usage <<Local Reference>> None
Facade relationship between CMP and session facade beans Usage <<Facade>> None
Mapping between enterprise beans and database objects Usage <<Map>> None
Security role relationship Usage <<Security Role>> None
Security role reference relationship Usage <<Security Role Reference>> None

 

Parent topic

UML visualization reference

 

Parent topic

UML visualization reference