Creating a diagram of Enterprise JavaBeans allows you to not only quickly create a set of beans which you can then populate with properties and methods, but also a graphical representation of those beans and the relationships and references between them.
To model Enterprise JavaBeans you need to start with an EJB diagram, although you can subsequently add other elements like UML classes, Java classes, business components, offline database tables, UML use cases and web services to the same diagram. For more information on creating a Java diagram, see Creating a Diagram of Enterprise JavaBeans.
UML notation is used to represent the elements on your diagram. For more information, see How to Read a Diagram of Enterprise JavaBeans.
Enterprise JavaBeans are created on a diagram by using the
Entity Bean
icon, Session Bean
icon or Message-Driven Bean
icon on the EJB Component Palette for the diagram, and then clicking on the
diagram where you want to create the element. The implementation files
for the modeled elements are created in the location specified by your
project settings. For more information, see
Modeling an Enterprise JavaBean on a Diagram.
Tip: If you want to model the implementing Java classes for a modeled bean on a diagram, right-click the modeled bean and choose Show | Implementation Files.
Properties and methods can be added by either double-clicking the bean and adding the property or method using the EJB Module Editor or by creating the new property or method 'in-place' on the modeled bean itself. For more information, see Modeling Properties and Methods on Beans.
References can be created from any bean to any other bean with a remote
interface using the EJB Reference
icon and local references can be created from any bean to any other bean
with a local interface using the EJB Local Reference
icon on the EJB Component Palette for the diagram. For more information, see
Modeling a Reference Between Beans.
A variety of relationships can be created quickly between modeled entity
beans using the 1 to * Relationship
icon, Directed 1 to 1 Relationship
icon, Directed 1 to * Relationship
and Directed Strong Aggregation
icons on the EJB Component Palette for the diagram. For more information,
see Modeling a Relationship Between
Entity Beans.
Note: If you change, add to, or delete from, the implementation files for anything that is displayed on a diagram, those changes will be reflected on modeled representations of those elements. Conversely, any changes to the modeled Enterprise JavaBeans are also made to the underlying implementation files.
You can annotate a diagram of Enterprise JavaBeans using notes, dependency relationships and URL links. For more information, see Annotating a Diagram.
Copyright © 1997, 2004, Oracle. All rights reserved.